You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<span> tag is formatted on a new line, but this introduces unwanted whitespaces. For example if I'd like to highlight first letter in a word.
How To Reproduce
INPUT
<divclass="hi"><divclass="poor"><pclass="format"><strong>H</strong>ello stranger, <strong>do not wrap span</strong>, <strong>pls</strong>.
<spanclass="big">H</span>ello stranger, <strong>do not wrap span</strong>, <spanclass="big">pls</span>.
</p></div></div>
OUTPUT
<divclass="hi"><divclass="poor"><pclass="format"><strong>H</strong>ello stranger, <strong>do not wrap span</strong>, <strong>pls</strong>.
<spanclass="big">H</span>
ello stranger, <strong>do not wrap span</strong>,
<spanclass="big">pls</span>
.
</p></div></div>
I'd like the <span> not to be formatted on a new line, <span> is inline element by default, so I think it's better to not wrap it same as e.g. <strong>. At least in cases where it's not surrounded by spaces.
When I investigated this I also tried to use max_line_length in pyproject.toml (as per docs), but I did not understand how it works - no matter of a value I used (60, 120, 200) the above example was returning the same results (I'd expect this to wrap lines).
Could someone explain me how should max_line_lenght work, please? (maybe I have something wrong in the config and it's not applied, but I don't know how to check as max_line_length behavior is not clear.
pyproject.toml is placed in the root of the project, where I execute djlint
[tool.djlint]
profile="django"
max_line_length=60
Thanks a lot.
The text was updated successfully, but these errors were encountered:
System Info
Issue
<span>
tag is formatted on a new line, but this introduces unwanted whitespaces. For example if I'd like to highlight first letter in a word.How To Reproduce
INPUT
OUTPUT
I'd like the
<span>
not to be formatted on a new line,<span>
is inline element by default, so I think it's better to not wrap it same as e.g.<strong>
. At least in cases where it's not surrounded by spaces.When I investigated this I also tried to use
max_line_length
inpyproject.toml
(as per docs), but I did not understand how it works - no matter of a value I used (60, 120, 200) the above example was returning the same results (I'd expect this to wrap lines).Could someone explain me how should
max_line_lenght
work, please? (maybe I have something wrong in the config and it's not applied, but I don't know how to check asmax_line_length
behavior is not clear.pyproject.toml
is placed in the root of the project, where I execute djlintThanks a lot.
The text was updated successfully, but these errors were encountered: