-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure logic blocks keep consistent namespacing (#14817)
* fix: ensure logic blocks keep consitent namespacing * lint * add test * handle `<title>` ambiguity the same as `<a>` * update changeset --------- Co-authored-by: Rich Harris <[email protected]>
- Loading branch information
1 parent
793f6f3
commit cd1adbc
Showing
4 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: inherit correct namespace for `<title>` elements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/svelte/tests/runtime-runes/samples/svg-namespace-if-block-3/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { test, ok } from '../../test'; | ||
|
||
export default test({ | ||
html: `<svg><title>potato</title></svg>`, | ||
test({ assert, target }) { | ||
const title = target.querySelector('title'); | ||
ok(title); | ||
|
||
assert.equal(title.namespaceURI, 'http://www.w3.org/2000/svg'); | ||
} | ||
}); |
5 changes: 5 additions & 0 deletions
5
packages/svelte/tests/runtime-runes/samples/svg-namespace-if-block-3/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<svg> | ||
{#if true} | ||
<title>potato</title> | ||
{/if} | ||
</svg> |