]> git.ipfire.org Git - thirdparty/jinja.git/commit
Compile `elif` tag to `elif` instead of `else: if` 760/head
authorAdrian Moennich <adrian@planetcoding.net>
Tue, 22 Aug 2017 20:59:57 +0000 (22:59 +0200)
committerAdrian Moennich <adrian@planetcoding.net>
Tue, 22 Aug 2017 21:12:09 +0000 (23:12 +0200)
commitcde2a54b87876bd02b283db2f52aca3d9272a92c
tree2cce6a0e6958fdb7d6c34cb9012f5216c2ab7d21
parentd117425f5ed3f542100f20d3bf700ae7bc54039f
Compile `elif` tag to `elif` instead of `else: if`

This avoids deep nesting in case of many `{% elif .. %}` blocks (which
would fail during execution) and also deep recursion (which may fail
during compilation)

fixes #759
CHANGES
jinja2/compiler.py
jinja2/idtracking.py
jinja2/nodes.py
jinja2/parser.py
tests/test_core_tags.py
tests/test_idtracking.py