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
Using block HTML tags inside macro function parameters causes the formatter to put a carriage return before and after the HTML tag.
How To Reproduce
Example test file and configuration have been included at the end. When executing the command djlint --check test.html , it produces the following output.
As can be seen, when inline HTML tags like <a> and <span> are used, then there is no issue. However, when block HTML tags like <hr> or <div> are used, it adds a carriage return before or after. Using single or double-quoted strings did not seem to matter. Although not shown, other block tags like <br> had the same behavior as <hr> and <div>.
BrokenEagle
changed the title
[BUG] [Formatter]
[BUG] [Formatter] Block HTML tags used as parameters for macro functions cause unneeded carriage returns
Aug 29, 2022
System Info
Issue
Using block HTML tags inside macro function parameters causes the formatter to put a carriage return before and after the HTML tag.
How To Reproduce
Example test file and configuration have been included at the end. When executing the command
djlint --check test.html
, it produces the following output.As can be seen, when inline HTML tags like
<a>
and<span>
are used, then there is no issue. However, when block HTML tags like<hr>
or<div>
are used, it adds a carriage return before or after. Using single or double-quoted strings did not seem to matter. Although not shown, other block tags like<br>
had the same behavior as<hr>
and<div>
.Files used
The text was updated successfully, but these errors were encountered: