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

[BUG] [Formatter] [PR open] Small max_attribute_length combined with a custom_html regex tag breaks formatting #883

Closed oliverhaas closed 1 month ago

oliverhaas commented 2 months ago

System Info

Issue

When using small max_attribute_length combined with a custom_html regex tag, the formatter breaks the custom html tags in some cases by inserting whitespace into the tag.

How To Reproduce

image

Fix

I've already implemented a fix and will make a PR right after this issue. The fix is basically what was already done for a similar issue (issue: https://github.com/djlint/djLint/issues/236, fix: https://github.com/djlint/djLint/commit/1ce378c43d3815edbb23cbc6664fc7ec540f68de), but apparently another similar regex in indent.py got overlooked, since my use-case is a very specific one :).

christopherpickering commented 1 month ago

:tada: This issue has been resolved in version 1.34.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: