When it doesn't break, it should conditionally omit the trailing space It should omit the trailing space if it is stripped anyway {% if a %}space {%- endif %} It should not omit the trailing space if there's trailing whitespace {% if a %}space {% endif %} {%- if a %}space {% endif -%} {% if a %}space {% endif %} It should not omit the whitespace because of whitespace stripping outside the tag

{% if a %}aaaaaaaaaaaaaaaaaamaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa {% endif %}{{ value }}

It should not omit the whitespace if it is included inline in a paragraph

haha{% if a %}space {% endif %}haha