Open OmarTawfik opened 6 months ago
Probably already works in v2 but I'll have to add it as a testcase
@Keats the bug exists in the latest published 1.19.0
. Given that v2 has no expected release date/still WIP, do you think it is possible to fix it in v1 in the meantime?
If someone does a PR sure
What does else
in a for
loop do, just out of curiosity?
@schungx https://keats.github.io/tera/docs/#for
Lastly, you can set a default body to be rendered when the container is empty:
{% for product in products %}
{{loop.index}}.{{product.name}}
{% else %}
No products.
{% endfor %}
Duplicate of #862?
The whitespace markers
{%-
and-%}
aroundfor
andendfor
strip whitespace correctly, but notelse
: