Skip to content

More configuration options for html-self-closing #837

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

Closed
jrmajor opened this issue Aug 4, 2024 · 2 comments · Fixed by #841
Closed

More configuration options for html-self-closing #837

jrmajor opened this issue Aug 4, 2024 · 2 comments · Fixed by #841
Labels
enhancement New feature or request

Comments

@jrmajor
Copy link
Contributor

jrmajor commented Aug 4, 2024

Description

I would like to be able to configure html-self-closing so that it aways produces most compact, yet correct tags. That would mean preferring void > self-closing > separate closing tag, but only within spec limitations.

I was able to accomplish that for HTML/Svelte with { void: 'never', normal: 'never' } settings (example output: <img><div></div><Component/>), but now it changes SVG tags from <path/> to <path></path>.

@jrmajor jrmajor added the enhancement New feature or request label Aug 4, 2024
@Shyam-Chen
Copy link

$ npx svelte-migrate self-closing-tags

@jrmajor
Copy link
Contributor Author

jrmajor commented Aug 10, 2024

@Shyam-Chen How is that related? Both <svg><path/></svg> and <svg><path></path></svg> are valid in Svetle 5 and migrate button in Svelte 5 REPL doesn't do anything to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants