Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
no need for extra tags
  • Loading branch information
kraih committed Mar 7, 2016
1 parent 486b22a commit 5009417
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Mojo/Template.pm
Expand Up @@ -104,7 +104,6 @@ sub parse {

# End
if ($op ne 'text' && $token =~ $end_re) {
$op = 'text';

# Capture start
splice @tree, -1, 0, ['cpst'] if $1;
Expand All @@ -113,7 +112,7 @@ sub parse {
_trim(\@tree) if ($trimming = $2) && @tree > 1;

# Hint at end
push @tree, ['text', ''];
push @tree, [$op = 'text', ''];
}

# Code
Expand Down Expand Up @@ -321,7 +320,7 @@ Mojo::Template - Perl-ish templates
% use Time::Piece;
<div>
% my $now = localtime;
<p>Time: <%= $now->hms %></p>
Time: <%= $now->hms %>
</div>
EOF
Expand All @@ -331,7 +330,7 @@ Mojo::Template - Perl-ish templates
<div>
<h1><%= $title %></h1>
% for my $i (@$numbers) {
* some text <%= $i %>
Test <%= $i %>
% }
</div>
EOF
Expand Down

0 comments on commit 5009417

Please sign in to comment.