Skip to content

Commit

Permalink
use more generic variable names in Mojo::DOM examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 5, 2014
1 parent 20deffc commit ca54968
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/Mojo/DOM.pm
Expand Up @@ -553,7 +553,7 @@ All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
=head2 content_xml
my $xml = $dom->content_xml;
my $str = $dom->content_xml;
Render content of this element to HTML/XML.
Expand Down Expand Up @@ -783,7 +783,7 @@ trimming is enabled by default.
=head2 to_xml
my $xml = $dom->to_xml;
my $str = $dom->to_xml;
Render this element and its content to HTML/XML.
Expand Down Expand Up @@ -873,7 +873,7 @@ Alias for L</"attr">.
=head2 stringify
my $xml = "$dom";
my $str = "$dom";
Alias for L</"to_xml">.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/DOM/HTML.pm
Expand Up @@ -349,7 +349,7 @@ Parse HTML/XML fragment.
=head2 render
my $xml = $html->render;
my $str = $html->render;
Render DOM to HTML/XML.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Plugin/PODRenderer.pm
Expand Up @@ -48,8 +48,8 @@ sub _html {

# Rewrite code blocks for syntax highlighting and correct indentation
for my $e ($dom->find('pre')->each) {
$e->replace_content(my $xml = unindent $e->content_xml);
next if $xml =~ /^\s*(?:\$|Usage:)\s+/m || $xml !~ /[\$\@\%]\w|-&gt;\w/m;
$e->replace_content(my $str = unindent $e->content_xml);
next if $str =~ /^\s*(?:\$|Usage:)\s+/m || $str !~ /[\$\@\%]\w|-&gt;\w/m;
my $attrs = $e->attr;
my $class = $attrs->{class};
$attrs->{class} = defined $class ? "$class prettyprint" : 'prettyprint';
Expand Down

0 comments on commit ca54968

Please sign in to comment.