djlint / djLint

✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang
https://djLint.com
GNU General Public License v3.0
686 stars 84 forks source link

Fix: not detecting tabs as a valid seperation between tags. #813

Closed ethan-vanderheijden closed 3 months ago

ethan-vanderheijden commented 8 months ago

Resolves: #812

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:

netlify[bot] commented 8 months ago

Deploy Preview for djlint canceled.

Name Link
Latest commit 3f84651d36d88fc9f6fe099ac33a072a8917e756
Latest deploy log https://app.netlify.com/sites/djlint/deploys/65fed174be3f1e0008d45a4a
monosans commented 3 months ago

Thank you!