Open
Description
The following template has invalid syntax:
{% if false %}
1
{% else if false %}
2
{% else %}
3
{% endif %}
The else if
should be elsif
, but instead of a SyntaxError
being raised, the template is parsed without error and the else if
acts as an else
. Thus, the above example will always produce 2
. This else if
should fail to parse since the else
has a condition (relevant code).
This can be confusing to end-users since the template is successfully parsed, leading them to believe the template is valid.