-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: improve namespace inference when having {@render}
and {@html}
tags
#10631
Conversation
🦋 Changeset detectedLatest commit: 36e01ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The simplification is great, thank you!
I'm not sure yet if we should change the behavior. Do you have a concrete use case where this yielded wrong results?
If we changed this, shouldn't we also change it for {@html ..}
?
I think we should do the same for |
{@render}
and {@html}
tags
thank you! |
When using
{@render ...}
in a component that has only svg nodes, the namespace gets themaybe_html
value which returns the default namespace (html). Instead{@render ...}
should be treated like child components, they should not affect the component's namespace.I also simplified the code a bit.
Svelte 5 rewrite
Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main
).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4
and notmain
.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint