mirror of https://github.com/sveltejs/svelte
correctly set mount anchor for HTML tags - fixes #2711
parent
873a561e83
commit
0c9ed46196
@ -0,0 +1,14 @@
|
|||||||
|
export default {
|
||||||
|
html: `
|
||||||
|
<div><span>hello</span> John</div>
|
||||||
|
<div><span>hello</span> Jill</div>
|
||||||
|
`,
|
||||||
|
|
||||||
|
test({ assert, component, target }) {
|
||||||
|
component.names = component.names.reverse();
|
||||||
|
assert.htmlEqual(target.innerHTML, `
|
||||||
|
<div><span>hello</span> Jill</div>
|
||||||
|
<div><span>hello</span> John</div>
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
<script>
|
||||||
|
export let names = ['John', 'Jill'];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#each names as name (name)}
|
||||||
|
<div>
|
||||||
|
<span>hello</span>
|
||||||
|
{@html name}
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
|
Loading…
Reference in new issue