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] Optional self closing block #1113

Open
2 tasks done
gone opened this issue Jan 22, 2025 · 1 comment
Open
2 tasks done

[FEATURE] Optional self closing block #1113

gone opened this issue Jan 22, 2025 · 1 comment

Comments

@gone
Copy link

gone commented Jan 22, 2025

Django component introduces a few blocks that it uses for control - component, slot, and fill. These tags can be self closing:
https://django-components.github.io/django-components/latest/concepts/fundamentals/template_tag_syntax/?h=self#self-closing-tags

you can set them to be used as control blocks by setting the custom_blocks configuration value like:

custom_blocks="component,slot,fill"

but now when using a self closing version of one of these tags, djlint would like to indent the following line as if it's inside a control block.

@gone
Copy link
Author

gone commented Jan 24, 2025

I know that's there been couple other attempts at this (#1054), but the bugs associated are closed. Made sense to me to have a feature open requesting it. Feel free to close if it's not helpful

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

No branches or pull requests

1 participant