-
-
Save anonymous/60ce67f9b496e3b0b5b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Mojo/Template.pm b/lib/Mojo/Template.pm | |
index e9d1780..551e0f4 100644 | |
--- a/lib/Mojo/Template.pm | |
+++ b/lib/Mojo/Template.pm | |
@@ -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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment