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
An expression {{ some_function(arg) }} inside a tag formats everything to a single-line, while without the attributes are split onto mutliple lines.
{{ some_function(arg) }}
Create an issue.html.jinja2 and format it with djLint.
issue.html.jinja2
{# correctly formatted #} <button class="btn p-1 m-1" id="a-very-very-very-long-id" aria-label="some button">Press me!</button> {# forced to one-line when adding expression #} <button class="btn p-1 m-1" id="a-very-very-very-long-id" aria-label="some button" {{ attributes(attr) }}>Press me! </button>
The text was updated successfully, but these errors were encountered:
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>
Sorry, something went wrong.
No branches or pull requests
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.The text was updated successfully, but these errors were encountered: