fix: ensure SVG element attributes have case preserved (#13935)

* fix: ensure SVG element attributes have case preserved

* fix: ensure SVG element attributes have case preserved

* fix: ensure SVG element attributes have case preserved
revert-13651-compile-warning
Dominic Gannaway 2 weeks ago committed by GitHub
parent feb2d85f46
commit 441124c5c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: ensure SVG element attributes have case preserved

@ -101,7 +101,7 @@ export function SvelteElement(node, context) {
node,
element_id,
attributes_id,
b.binary('!==', b.member(element_id, 'namespaceURI'), b.id('$.NAMESPACE_SVG')),
b.binary('===', b.member(element_id, 'namespaceURI'), b.id('$.NAMESPACE_SVG')),
b.call(b.member(b.member(element_id, 'nodeName'), 'includes'), b.literal('-')),
context.state
);

@ -0,0 +1,5 @@
import { test } from '../../test';
export default test({
html: `<svg viewBox="0 0 10 10"></svg><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"></svg><svg viewBox=""></svg>`
});

@ -0,0 +1,4 @@
<svelte:options namespace="svg" />
<svelte:element this="svg" viewBox="0 0 10 10" />
<svelte:element this="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" />
<svg viewBox="" />
Loading…
Cancel
Save