diff --git a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts index f83b1f2acf56..a05898c437c7 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Attribute.ts @@ -240,7 +240,7 @@ export default class AttributeWrapper { return chunk.type === 'Text' ? chunk.data.replace(/"/g, '\\"') : `\${${chunk.render()}}`; - })}"`; + }).join('')}"`; } } diff --git a/test/runtime/samples/innerhtml-interpolated-literal/_config.js b/test/runtime/samples/innerhtml-interpolated-literal/_config.js new file mode 100644 index 000000000000..a98ed85345c6 --- /dev/null +++ b/test/runtime/samples/innerhtml-interpolated-literal/_config.js @@ -0,0 +1,7 @@ +export default { + html: ` +
+ +
+ ` +} \ No newline at end of file diff --git a/test/runtime/samples/innerhtml-interpolated-literal/main.svelte b/test/runtime/samples/innerhtml-interpolated-literal/main.svelte new file mode 100644 index 000000000000..8a3c9272a5b6 --- /dev/null +++ b/test/runtime/samples/innerhtml-interpolated-literal/main.svelte @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file