-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
- Python Version Python 3.11.4
- djlint, version 1.36.4
- template language: default
- Python clean venv with only djlint installed
Issue
When reformatting HTML using djlint test.html --reformat, extra indentation (3 spaces) is added before the href and title attributes in a multiline tag.
The same old issue #189
How To Reproduce
Create a clean Python virtual environment and install only djlint.
Activate the venv.
Run the command in Windows CMD 'djlint test.html --reformat'
Use snippet
<a class="btn btn-primary" href="{{ url("url") }}" title="{{ _("Title") }}">
<span class="iconify" data-icon="mdi:camera"></span> {{ _("Analyse your image!") }}</a>
<div class="popup beautiful-popup" id="analysis-options">
<h4>{{ _("Options") }}</h4> [...]
</div>output:
<a class="btn btn-primary"
href="{{ url("url") }}"
title="{{ _("Title") }}">
<span class="iconify" data-icon="mdi:camera"></span> {{ _("Analyse your image!") }}</a>
<div class="popup beautiful-popup" id="analysis-options">
<h4>{{ _("Options") }}</h4>
[...]
</div>The href and title attributes are indented by 3 spaces instead of being aligned properly, and the inner content of the tag gets an additional indent level.