X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FTTParser.pm;h=d27e412678ec355a458e7a89ed2fad2b1dbe8278;hb=2b8b5ae225af6119e41e2112f9a8573b4170b927;hp=87ad744a65d9ce781777afb53a5bf35df3536574;hpb=8c687edb664387b04edd30ee9a472353aabb3d6b;p=koha_fer diff --git a/C4/TTParser.pm b/C4/TTParser.pm index 87ad744a65..d27e412678 100644 --- a/C4/TTParser.pm +++ b/C4/TTParser.pm @@ -40,6 +40,7 @@ sub next_token{ #unshift token back on @tokens sub unshift_token{ + my $self = shift; unshift @tokens, shift; } @@ -74,7 +75,7 @@ sub text{ my $is_cdata = shift; while($work){ # if there is a template_toolkit tag - if( $work =~ m/\[%.*?\]/ ){ + if( $work =~ m/\[%.*?%\]/ ){ #everything before this tag is text (or possibly CDATA), add a text token to tokens if $` if( $` ){ my $t = C4::TmplToken->new( $`, ($is_cdata? C4::TmplTokenType::CDATA : C4::TmplTokenType::TEXT), $line, $self->{filename} );