From: Moritz Bunkus Date: Mon, 31 Jan 2011 13:07:21 +0000 (+0100) Subject: Templates: bei verschachtelten <%if%> / <%foreach%> das richtige <%end%> finden X-Git-Tag: release-2.6.2~22^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1a75ec5dd6d9365e6c336549bd2b947aef6200fc;p=kivitendo-erp.git Templates: bei verschachtelten <%if%> / <%foreach%> das richtige <%end%> finden --- diff --git a/SL/Template/LaTeX.pm b/SL/Template/LaTeX.pm index d1c208018..8736cc2b1 100644 --- a/SL/Template/LaTeX.pm +++ b/SL/Template/LaTeX.pm @@ -134,7 +134,7 @@ sub find_end { my $keyword_pos = $pos - 1 + $tag_start_len; - if ((substr($text, $keyword_pos, 2) eq 'if') || (substr($text, $keyword_pos, 3) eq 'foreach')) { + if ((substr($text, $keyword_pos, 2) eq 'if') || (substr($text, $keyword_pos, 7) eq 'foreach')) { $depth++; } elsif ((substr($text, $keyword_pos, 4) eq 'else') && (1 == $depth)) {