Last active
August 29, 2015 14:26
-
-
Save seenae/a82896b838be1fe218a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reference:https://github.com/mitsuhiko/jinja2/issues/164 | |
example: | |
{% set the_var = 'foo' %} | |
{% for e in elements %} | |
{% if e == 0 %}} | |
{% set the_var = 'YES' %} | |
the var: {{ the_var }} | |
{endif} | |
{%- endfor %} | |
the_var: {{ the_var }} | |
Result: | |
the_var: YES | |
the_var: YES | |
the_var: foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment