From 10807ef6c860b8d05f1b97d14396056d8dd379ed Mon Sep 17 00:00:00 2001 From: Christopher Hall Date: Thu, 3 Feb 2011 12:16:12 +1300 Subject: [PATCH] fixed for/end scoping issue for single lines --- installer/html-template-to-template-toolkit.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/installer/html-template-to-template-toolkit.pl b/installer/html-template-to-template-toolkit.pl index 05827c451b..ce65e97d3d 100755 --- a/installer/html-template-to-template-toolkit.pl +++ b/installer/html-template-to-template-toolkit.pl @@ -78,6 +78,9 @@ foreach my $file (@template_files) { my $for_loop_found = 0; for my $input_tmpl(<$ITMPL>){ + my @parts = split "<", $input_tmpl; + for( my $i=0; $i<=$#parts; ++$i ){ + my $input_tmpl = $i ? "<" . $parts[$i] : $parts[$i]; # add < sign back in to every part except the first $for_loop_found = 0; # handle poorly names variable such as f1!, f1+, f1-, f1| and mod @@ -175,6 +178,7 @@ foreach my $file (@template_files) { # Write out.. print $OTT $input_tmpl; + } } close $ITMPL; close $OTT; -- 2.20.1