]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Fix "not" expressions consuming variable starting with not
authorKevin Brown <kevin@kevin-brown.com>
Fri, 15 May 2020 21:17:39 +0000 (17:17 -0400)
committerKevin Brown <kevin@kevin-brown.com>
Fri, 15 May 2020 21:17:39 +0000 (17:17 -0400)
The `not` expression should have a space between the word "not" and
the expression which is being negated. Otherwise it will incorrectly
pick up things like "nothing" as "not thing" because it technically
meets the criteria.

grammar.ebnf

index 7b498b55b47b13a70f20c265e090bd40c1362345..127f567579a7ae3bc41bbfa7523eff6a69d42118 100644 (file)
@@ -335,7 +335,7 @@ conditional_expression_parentheses
 \r
 conditional_expression_not\r
     =\r
-    "not" {SP}* not:conditional_expression\r
+    "not" {SP}+ not:conditional_expression\r
     ;\r
 \r
 conditional_expression_if\r