Closed hansemschnokeloch closed 3 months ago
If you search the code for the string "elif"
, you will find this list of "closing and opening tags":
CLOSING_AND_OPENING_TAGS = [
"elif",
"else",
"empty",
"plural",
]
If you want your fork to support Twig's {% elseif %}
statement, you can add it to this list. It won't be merged into mainline DjHTML though, because it (currently) only supports Django and Jinja syntaxes, which both use {% elif %}
.
Hi,
I'm using djhtml to format twig files. It works very well except for
elseif
that is used by twig instead ofelif
in jinja2How can I modify djhtml in order to recognize
elseif
aselif
?Adding
elif
in twig was discussed here https://github.com/twigphp/Twig/issues/1282