Open GPla opened 9 months ago
Similarly, I have
<a
class="dropdown-item{% if item.class %}{{item.class}}{% endif %}"
href="{{ item.url }}"
{% if item.html_attrs %} {% for attr, value in item.html_attrs.items %}{{ attr }}="{{ value }}"{% endfor %} {% endif %}
{% if item.target %}target="{{ item.target }}"{% endif %}
{% if item.confirm %}onclick="return confirm('{{ item.confirm }}');"{% endif %}
>
<i class="dropdown-item-icon"></i>{{ item.label }}
</a>
gets auto formatted to:
<a class="dropdown-item{% if item.class %}{{ item.class }}{% endif %}" href="{{ item.url }}" {% if item.html_attrs %} {% for attr, value in item.html_attrs.items %}{{ attr }}="{{ value }}"{% endfor %} {% endif %} {% if item.target %}target="{{ item.target }}"{% endif %} {% if item.confirm %}onclick="return confirm('{{ item.confirm }}');"{% endif %}>
<i class="dropdown-item-icon"></i>{{ item.label }}
</a>
System Info
Issue
An expression
{{ some_function(arg) }}
inside a tag formats everything to a single-line, while without the attributes are split onto mutliple lines.How To Reproduce
Create an
issue.html.jinja2
and format it with djLint.