Skip to content

Commit

Permalink
improved test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 27, 2011
1 parent 5036e40 commit c98f9d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -573,12 +573,12 @@ like that.
<%= Perl expression, replaced with result %>
<%== Perl expression, replaced with XML escaped result %>
<%# Comment, useful for debugging %>
<%% Replace with "<%" and keep parsing, useful for generating templates %>
<%% Replaced with "<%", useful for generating templates %>
% Perl line
%= Perl expression line, replaced with result
%== Perl expression line, replaced with XML escaped result
%# Comment line, useful for debugging
%% Replace with "%" and keep parsing, useful for generating templates
%% Replaced with "%", useful for generating templates
=head2 Automatic Escaping
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -59,12 +59,12 @@ set of special tags and line start characters.
<%= Perl expression, replaced with XML escaped result %>
<%== Perl expression, replaced with raw result %>
<%# Comment, useful for debugging %>
<%% Replace with "<%" and keep parsing, useful for generating templates %>
<%% Replaced with "<%", useful for generating templates %>
% Perl line
%= Perl expression line, replaced with XML escaped result
%== Perl expression line, replaced with raw result
%# Comment line, useful for debugging
%% Replace with "%" and keep parsing, useful for generating templates
%% Replaced with "%", useful for generating templates

The simplest form is used to insert raw Perl code.
Tags and lines work pretty much the same, but depending on context one will
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/template.t
Expand Up @@ -119,7 +119,7 @@ is $output, "%= 1 + 1\n", 'expression line has been replaced';
$mt = Mojo::Template->new;
$output = $mt->render(<<'EOF');
%% my $number = <%= 20 + 3%>;
The number is <%%= $number %>.
The number is <%%= <%= '$' %>number %>.
EOF
is $output, "% my \$number = 23;\nThe number is <%= \$number %>.\n",
'mixed lines have been replaced';
Expand Down

0 comments on commit c98f9d4

Please sign in to comment.