also escape back-ticks and backslashes in text nodes in SSR code (#616)
@ -7,5 +7,5 @@ export default function visitText(
block: Block,
node: Node
) {
generator.append(node.data.replace(/\${/g, '\\${'));
generator.append(node.data.replace(/(\${|`|\\)/g, '\\$1'));
}
@ -0,0 +1,3 @@
export default {
html: '<code>`${foo}\\n`</code>'
};
@ -0,0 +1 @@
<code>`${foo}\n`</code>