-
-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
Description
- I'm on the latest version of djLint
- I've searched the issues
- I've read the docs
System Info
- OS: Windows 11 64-bit
- Python Version 3.14.2
- djLint Version 1.36.4
- template language: Django Template
Issue
Djlint has stupid the annoying issue where it wraps condensing Jinja tags from multiple lines into one line.
Example #1:
Before:
{{ terms_form.move_in_date }}
{% if terms_form.move_in_date.errors %}
<span class="form-text text-danger">{{ terms_form.move_in_date.errors.0 }}</span>
{% endif %}Example #1 after:
{{ terms_form.move_in_date }} {% if terms_form.move_in_date.errors %}
<span class="form-text text-danger">{{ terms_form.move_in_date.errors.0 }}</span>
{% endif %}Example #2:
Before:
{% csrf_token %}
{% if messages %}
{% for message in messages %}
<div class="row mb-3">
<div class="col">
<div class="alert alert-danger">{{ message }}</div>
</div>
</div>
{% endfor %}
{% endif %}After:
{% csrf_token %} {% if messages %} {% for message in messages %}
<div class="row mb-3">
<div class="col">
<div class="alert alert-danger">{{ message }}</div>
</div>
</div>
{% endfor %} {% endif %}How To Reproduce
- Just write code like in the examples before formatting
- Save file
Reactions are currently unavailable