You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code triggers a parse error in twig.js (this compiles successfully in its PHP counterpart). Note I've only tested this for the elseif tag. It could affect other tags as well. Removing the extra space after elseif fixes the parse error.
Hi there
{% if true %}
Yup
{% else %}
{% if 1 > 2 %}
This should not print
{% elseif 5 > 2 %}
This should print
{% endif %}
{% endif %}
Expected behavior: code compiles successfully despite the extra space after elseif Actual behavior: code returns the following error:
TwigException: Unable to parse 'elseif 5 > 2'
Node version 12.13.1
Twig version 1.14.0
The text was updated successfully, but these errors were encountered:
The following code triggers a parse error in twig.js (this compiles successfully in its PHP counterpart). Note I've only tested this for the
elseif
tag. It could affect other tags as well. Removing the extra space afterelseif
fixes the parse error.Expected behavior: code compiles successfully despite the extra space after
elseif
Actual behavior: code returns the following error:
Node version 12.13.1
Twig version 1.14.0
The text was updated successfully, but these errors were encountered: