fix svelte element new lines

print
Manuel Serret 3 days ago
parent 452c997fbe
commit 2372f176c0

@ -756,10 +756,10 @@ const svelte_visitors = {
context.visit(node.tag);
context.write('}');
attributes(node.attributes, context);
// TODO new line handling not working?
if (node.fragment && node.fragment.nodes.length > 0) {
context.write('>');
block(context, node.fragment, true);
block(context, node.fragment);
context.write(`</svelte:element>`);
} else {
context.write(' />');

@ -2,4 +2,6 @@
let tag = $state('hr');
</script>
<svelte:element this={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