-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
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
[BUG] [Linter] [Django] Wrong indentation if the custom template tag name starts with "for" #686
Comments
christopherpickering
pushed a commit
that referenced
this issue
Jun 12, 2023
# [1.31.0](v1.30.2...v1.31.0) (2023-06-12) ### Bug Fixes * **formatter:** fixed `line_break_after_multiline_tag` to force break in all cases ([3b37ec8](3b37ec8)), closes [#680](#680) * **formatter:** fixed isolated quotes being deleted from attributes ([19425f9](19425f9)), closes [#652](#652) * **formatter:** fixed wild match on template tags ([d288b78](d288b78)), closes [#686](#686) * **linter:** fixed false positive on t001 ([1caf4c4](1caf4c4)), closes [#606](#606) ### Features * **formatter:** added `max-blank-lines` flag to consolidate blank lines ([4a7897f](4a7897f)), closes [#675](#675) * **formatter:** added support for symphony forms ([e716ddc](e716ddc)), closes [#476](#476)
🎉 This issue has been resolved in version 1.31.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
HI Christopher, I just upgraded djlint to last realease but I still have the issue. Before djlint formatting <div class="form-inputs plans-form">
<div class="trans-wrapper pos-comparator-flex">
{% for field in POSOptimizer %}
<div>
<label>{{ field.label }}</label>
{% formfield field show_label=False %}
</div>
{% endfor %}
<div>
<label> </label>
<button type="submit">{% trans "Calcola" %}</button>
</div>
</div>
</div> After djlint fromatting <div class="form-inputs plans-form">
<div class="trans-wrapper pos-comparator-flex">
{% for field in POSOptimizer %}
<div>
<label>{{ field.label }}</label>
{% formfield field show_label=False %}</div>{% endfor %}
<div>
<label> </label>
<button type="submit">{% trans "Calcola" %}</button>
</div>
</div>
</div> |
@fab10m thanks for the example, I will check it out! |
christopherpickering
pushed a commit
that referenced
this issue
Jun 26, 2023
## [1.31.1](v1.31.0...v1.31.1) (2023-06-26) ### Bug Fixes * **formatter:** fixed formatter formatting ignored code ([5c75d87](5c75d87)), closes [#655](#655) * **formatter:** fixed function formatting with nested quoted parenthesis ([6d63a6a](6d63a6a)), closes [#698](#698) * **formatter:** fixed overgrabbing on template tag condensing ([75c3134](75c3134)), closes [#686](#686) * **formatter:** function index was not formatted correctly ([a197200](a197200)), closes [#693](#693)
🎉 This issue has been resolved in version 1.31.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have this block of code
and djlint put the {% endfor %} immediately after formfield tag.
Thanks,
Fabio
System Info
The text was updated successfully, but these errors were encountered: