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

[FEATURE] [Formatter] Support django-components' self-closing template tags #1054

Open
2 tasks done
oliverhaas opened this issue Nov 30, 2024 · 1 comment · May be fixed by #1055
Open
2 tasks done

[FEATURE] [Formatter] Support django-components' self-closing template tags #1054

oliverhaas opened this issue Nov 30, 2024 · 1 comment · May be fixed by #1055

Comments

@oliverhaas
Copy link
Contributor

Feature Request

I'd like to support django-components self-closing tags.

Currently the main (and only?) issue is that djlint will try to indent these, because it does not understand that it's actually self-closing. I'll open a PR in a minute...

@oliverhaas oliverhaas linked a pull request Nov 30, 2024 that will close this issue
2 tasks
@oliverhaas
Copy link
Contributor Author

I realized I can achieve what I want with a hack

custom_blocks = "component(?=(?:(?!/\\s%}).)*%})"

which probably is not the be-all and end-all, but it's good enough for me for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant