Our problem was that - is both an identifier character and the character we use for stripping whitespace from the end of tags and variable output (-%} and -}}).
So {% else-%} threw an error because tagNamewas followed by -, which is an identifier character.
The solution is to change that rule to the following:
This is a weird parsing ambiguity problem.
Before, our rule was the following:
Our problem was that
-
is both an identifier character and the character we use for stripping whitespace from the end of tags and variable output (-%}
and-}}
).So
{% else-%}
threw an error becausetagName
was followed by-
, which is an identifier character.The solution is to change that rule to the following:
-}}
,-%}
, ORFixes #126