]> mj.ucw.cz Git - temple.git/commitdiff
@(...) follows conditions properly
authorMartin Mares <mj@ucw.cz>
Mon, 4 Apr 2016 22:12:08 +0000 (00:12 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 4 Apr 2016 22:12:08 +0000 (00:12 +0200)
UCW/Temple.pm

index 5fc82d0bea5612c92855adce5b323f808ca08ed4..45c0ca37961003a6eac9fb18c3ad790b5391a05e 100644 (file)
@@ -187,7 +187,7 @@ sub parse_string($$) {
                        my $x = get_nested(\$t, '\(', '\)');
                        $x =~ s/^\(//;
                        $x =~ s/\)$//;
-                       out (defined($arguments->{$x}) ? $arguments->{$x} : "");
+                       out (defined($arguments->{$x}) ? $arguments->{$x} : "") if $cond[0] > 0;
                } elsif ($t =~ /\G\@(\w+)\(/cgs) {
                        my $func = $1;
                        my $args = get_function_args(\$t, '(', ')');