From 1a75ec5dd6d9365e6c336549bd2b947aef6200fc Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 31 Jan 2011 14:07:21 +0100 Subject: [PATCH] Templates: bei verschachtelten <%if%> / <%foreach%> das richtige <%end%> finden --- SL/Template/LaTeX.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- 2.20.1