{{ ' ' }} makes a whitespace that resists being collapsed by either jinja or the formatter, which allows to contract the regular whitespace aggressively on jinja side
construct is a bit ugly but maybe this is best option after all
however the formatter now wants to put that on one line:
System Info
3.11.5
)1.34.1
)Issue
I have some jinja that is formatted like this after formatting:
I am trying to use jinja whitespace control to end up with rendered html like:
I've enabled
trim_blocks
andlstrip_blocks
I can do this:
and get:
But in the case where the conditional is false I still have an extra whitespace:
I could do this:
and all the cases would look right when rendered
But the formatter wants to get rid of the inner whitespace here
%} class
...it's this behaviour I'd like to have control over - maybe an option to preserve such whitespace?
Other option that works right now is:
{{ ' ' }}
makes a whitespace that resists being collapsed by either jinja or the formatter, which allows to contract the regular whitespace aggressively on jinja sideconstruct is a bit ugly but maybe this is best option after all
however the formatter now wants to put that on one line:
that's ok for me, but if I can't have multi-line formatting I'd rather be able to have a normal whitespace
How To Reproduce
see above