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

It is not possible to enable feature for self closing empty tags/components #412

Open
ToP29 opened this issue Dec 10, 2023 · 2 comments
Open

Comments

@ToP29
Copy link

ToP29 commented Dec 10, 2023

It is not possible to enable feature for self closing empty tags/components. I would like this feature back. Why not add another option to config, so user can choose if to enable it or disable it.

From readme:
Whether or not empty elements/components should self-close is now left to the user - in other words, if you write

or that stays as is, and so does
/. If svelteStrictMode is turned on, it will still only allow
notation for elements (but it will leave your components alone)

@dummdidumm
Copy link
Member

dummdidumm commented Dec 10, 2023

You can write them like that yourself, prettier won't expand the autoclosing. I therefore don't think we need an option for this

@jeannemas
Copy link

I don't know if I'm right, but it might be related to an issue I've been encountering recently: when using the option svelteStrictMode: true, the <enhanced:img> tags from @sveltejs/enhanced-img is always replaced by an explicit closing tag (</enhanced:img>), even if I manually already specified a self-closing one (<enhanced:img ... />). This is an issue because enhanced:img doesn't support an explicit closing tag.

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

3 participants