Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
optimize successive text lines in Mojo::Template
  • Loading branch information
kraih committed Sep 1, 2014
1 parent 85a45dd commit 3b0a7ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Mojo/Template.pm
Expand Up @@ -219,7 +219,9 @@ sub parse {
}
}

push @tree, \@token;
push @tree, \@token and next
if !@tree || grep { @$_ != 2 || $_->[0] ne 'text' } $tree[-1], \@token;
$tree[-1][1] .= $token[1];
}

return $self;
Expand Down

0 comments on commit 3b0a7ff

Please sign in to comment.