When using the indent filter on a block, empty lines are also indented. This is a divergence between Jinja and Nunjucks behaviour and should be addressed.
For example, the template below
{% set content %}
This is some text
and this is some more text.
{% endset %}
{% set content = content | indent(2, true) %}
{{ content }}
when rendered produces
..This is some text
..
..and this is some more text.
When using the
indent
filter on a block, empty lines are also indented. This is a divergence between Jinja and Nunjucks behaviour and should be addressed.For example, the template below
when rendered produces
instead of
Jinja issue: https://github.com/pallets/jinja/issues/681 Jinja PR: https://github.com/pallets/jinja/pull/685