Skip to content
New issue

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

[BUG] [Formatter] Template tags inside template tags (e.g. when using django-components) #1052

Closed
3 tasks done
oliverhaas opened this issue Nov 30, 2024 · 0 comments · Fixed by #1053
Closed
3 tasks done
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@oliverhaas
Copy link
Contributor

oliverhaas commented Nov 30, 2024

System Info

  • OS: ubuntu 24.04
  • Python Version: 3.12
  • djLint Version: 1.36.3
  • template language: django

Issue

When using template tags inside template tags

I'm aware that this is probably not the cleanest syntax, but some popular packages like django-components do this, so I would say it's worth a quick fix.

How To Reproduce

Best to look at the PR I'm submitting in a minute

Settings

 custom_blocks="component"

Try to format

{% component "img" src="{% url "my_image" %}" %}

you will get

{% component "img" src="{% url "my_image" %}
" %}

instead of doing actually nothing in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦠 bug Something isn't working 🧽 formatter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant