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
from @Kakadus in #195 I am experiencing this bug as well and were able to construct a minimal example. With
<a {% if cond %} class="somelongclass {% if cond2 %}otherlongclass{% endif %} anotherlongclass"{% endif %}></a>
the nested ifs break the code:
<a {% if cond %} class="somelongclass {% if cond2 %}otherlongclass{% endif %} anotherlongclass {% endif %}></a>
Configuration with pyproject.toml:
[tool.djlint] profile = "django" format_attribute_template_tags = false
With format_attribute_template_tags = true, everything is reformatted as
<a {% if cond %} class="somelongclass {% if cond2 %} otherlongclass {% endif %} anotherlongclass {% endif %}></a>
The text was updated successfully, but these errors were encountered:
I can't come up with a regex to match nested statements properly... I thinking this will need to wait until we have a decent attribute parser working.
Sorry, something went wrong.
No branches or pull requests
from @Kakadus in #195
I am experiencing this bug as well and were able to construct a minimal example.
With
the nested ifs break the code:
Configuration with pyproject.toml:
With format_attribute_template_tags = true, everything is reformatted as
The text was updated successfully, but these errors were encountered: