fix svelte-element

print
Manuel Serret 3 days ago
parent c7befaf681
commit 4c4856da34

@ -768,12 +768,11 @@ const svelte_visitors = {
},
SvelteElement(node, context) {
context.write('<svelte:element');
context.write('<svelte:element ');
// TODO spaces at interesting places
context.write('this={');
context.visit(node.tag);
context.write('} ');
context.write('}');
for (const attribute of node.attributes) {
// TODO handle multiline

@ -2,4 +2,4 @@
let tag = $state('hr');
</script>
<svelte:elementthis={tag} >This text cannot appear inside an hr element</svelte:element>
<svelte:element this={tag}>This text cannot appear inside an hr element</svelte:element>

Loading…
Cancel
Save