]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Output nodes are always lists
authorKevin <kevin@kevin-brown.com>
Sun, 10 May 2020 14:43:50 +0000 (10:43 -0400)
committerKevin <kevin@kevin-brown.com>
Sun, 10 May 2020 14:43:50 +0000 (10:43 -0400)
Right now we don't optimize Output nodes so that ones next to each
other are combined, but they should all contain a list of a single
node in preparation for eventually doing that.

new_parser.py

index 56e927229bfc95707dcd47aa37d9f885ddd63625..40324c701893408b1d5792b910e2d1cacbd91b7c 100644 (file)
@@ -95,7 +95,7 @@ def parse_print(ast):
     for accessor_ast in variable['accessors']:\r
         node = parse_variable_accessor(node, accessor_ast)\r
 \r
-    return nodes.Output(node)\r
+    return nodes.Output([node])\r
 \r
 def parse_template(ast):\r
     return nodes.Template(parse(ast), lineno=1)\r