Skip to content

Commit

Permalink
more diverse Mojo::DOM examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 13, 2014
1 parent 5588263 commit bcdba83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Mojo/DOM.pm
Expand Up @@ -593,8 +593,9 @@ and C<tag> nodes) or raw content.
# " Test "
$dom->parse('<!-- Test --><br>')->contents->first->content;
# "<!-- 123 --><br>"
$dom->parse('<!-- Test --><br>')->contents->first->content(' 123 ')->root;
# "<div><!-- 123 -->456</div>"
$dom->parse('<div><!-- Test -->456</div>')->at('div')
->contents->first->content(' 123 ')->root;
# "<p><i>123</i></p>"
$dom->parse('<p>Test</p>')->at('p')->content('<i>123</i>')->root;
Expand Down

0 comments on commit bcdba83

Please sign in to comment.