We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long lines inside moderately complex logic appears to confuse djLint, causing it to outdent closing tags.
Given this users/templates/users/password-strength.html…
users/templates/users/password-strength.html
{% if password_strength or crack_time_display %} {% if password_strength %} Your password strength: <span class="password-strength--{{ password_strength|slugify }}">{{ password_strength|capfirst }}</span> {% endif %} {% if crack_time_display %} Estimated time to crack: <span class="password-strength--crack-time">{{ crack_time_display|capfirst }}</span> {% endif %} {% endif %}
…when I run…
djlint --profile django --reformat users/templates/users/password-strength.html
…the file is reformatted as…
The text was updated successfully, but these errors were encountered:
FWIW, breaking long lines up a bit works around this issue. Once broken up, the template is formatted as you'd expect:
Sorry, something went wrong.
8f36fec
chore(release): 1.17.1 [skip ci]
15a2950
## [1.17.1](v1.17.0...v1.17.1) (2022-09-21) ### Bug Fixes * **formatter:** fixed poor indentation on span tags with leading text ([8f36fec](8f36fec)), closes [#398](#398) * **t002:** fixed false positive in t002. Added test ([e23ee46](e23ee46)), closes [#399](#399)
🎉 This issue has been resolved in version 1.17.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
No branches or pull requests
System Info
Issue
Long lines inside moderately complex logic appears to confuse djLint, causing it to outdent closing tags.
How To Reproduce
Given this
users/templates/users/password-strength.html
……when I run…
…the file is reformatted as…
The text was updated successfully, but these errors were encountered: