]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Remove whitespace parsing from inside block
authorKevin Brown <kevin@kevin-brown.com>
Fri, 8 May 2020 23:25:50 +0000 (19:25 -0400)
committerKevin <kevin@kevin-brown.com>
Sun, 10 May 2020 01:50:06 +0000 (21:50 -0400)
This fixes an issue where trailing whitespace within blocks was being
processed as an expression instead of being collected into the block
definition. Now the whitespace is consisitently stored within the
block expression which should make whitespace handling easier to
implement.

tatsu_grammar.txt

index 3aa9e05ac2da6795cf1845b22a95b5214e83e9a1..cf0b6360246493cfb6e99ed8509a74abd035a79d 100644 (file)
@@ -39,7 +39,7 @@ raw_block_end
 \r
 block_expression\r
     =\r
-    | ( block_start {SP}* expressions {SP}* block_end )\r
+    | ( block_start expressions block_end )\r
     | block_start\r
     ;\r
 \r