[BUG] [Formatter] Some formatting happens in {# djlint:off #}
and {# djlint:on #}
blocks
#824
Open
3 tasks done
Labels
System Info
Issue
Some formatting happens, even between
{# djlint:off #}
and{# djlint:on #}
pragmas.How To Reproduce
Save an
example.html
file with the following indentation:Then run
djlint --reformat example.html
and notice what happened to the closing</style>
tag:PS: there is another off/on pragma bug described in this separate issue that I'm also able to reproduce with
1.34.1
. However, I don't believe this bug and that bug are related.Wait,
<style>
tags in the middle of templates?I use css-scope-inline, so my Django templates tend to have
<style>
tags nested in them.Because my styles sometimes have template substitutions in them (
color: {{ color }};
), I tend to wrap them with on/off pragmas ({# djlint:off #}
). This bug doesn't requireformat_css
to be enabled.The text was updated successfully, but these errors were encountered: