fix claim_text

pull/6275/head
tanhauhau 5 years ago
parent a39fc8de72
commit dd4233212e

@ -216,7 +216,7 @@ export function claim_text(nodes, data) {
const node = nodes[i];
if (node.nodeType === 3) {
node.data = '' + data;
return nodes.shift();
return nodes.splice(i, 1)[0];
}
}

@ -0,0 +1,5 @@
<svelte:head>
<title>Title</title>
</svelte:head>
<main>There should be one</main>

@ -0,0 +1,2 @@
<p>This <code>p</code> and the <code>slot</code> below are direct children of the root.</p>
<slot />

@ -0,0 +1,3 @@
<p>This <code>p</code> and the <code>slot</code> below are direct children of the root.</p>
<main>There should be one</main>

@ -0,0 +1,5 @@
<p>This <code>p</code> and the <code>slot</code> below are direct children of the root.</p>
<main>There should be one</main>
<!-- need extra space after <main> -->

@ -0,0 +1,8 @@
<script>
import Layout from './Layout.svelte';
import Component from './Component.svelte';
</script>
<Layout>
<Component />
</Layout>
Loading…
Cancel
Save