djLint
djLint copied to clipboard
Fix: not detecting tabs as a valid seperation between tags.
Resolves: #812
- [x] Added tests for changed code.
It wasn't detecting tabs as a valid whitespace between HTML tags, causing it to transform:
<div>\n\t<p></p>\n</div>
into:
<div>\n\t\n<p></p>\n</div>
Notice that the transformed text has an extra new line after the tab character. Normally extra new lines are removed, but with --preserve-blank-lines
, this extra new line persists.
Note:
-
--preserve-blank-lines
and--max-blank-lines
are incompatible with each other (I think this was true before my PR). Since--max-blank-lines
preserves blank lines as well, it would make a lot of sense to combine the two options into one.
Deploy Preview for djlint canceled.
Name | Link |
---|---|
Latest commit | 3f84651d36d88fc9f6fe099ac33a072a8917e756 |
Latest deploy log | https://app.netlify.com/sites/djlint/deploys/65fed174be3f1e0008d45a4a |
Thank you!