]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Properly parse with targets
authorKevin <kevin@kevin-brown.com>
Sun, 10 May 2020 14:42:21 +0000 (10:42 -0400)
committerKevin <kevin@kevin-brown.com>
Sun, 10 May 2020 14:42:21 +0000 (10:42 -0400)
The targets of with expressions (the variables to load) should be
properly parsed as a variable using the same load logic which is
used in other areas of the parser.

new_parser.py

index 8eec89cd6fef90815f3e721bc7dd2dc2702ebea7..fee8a4a4fc887017181b47f9029551b75a46bb6c 100644 (file)
@@ -62,7 +62,7 @@ def parse_block_with(ast):
             raise\r
 \r
         targets.append(parameter['key'])\r
-        values.append(parameter['value'])\r
+        values.append(parse_variable(parameter['value']))\r
 \r
     with_node.targets = targets\r
     with_node.values = values\r