enclose text/compound slot attributes in backticks - fixes #2061

pull/2065/head
Rich Harris 6 years ago
parent cf775486cf
commit e9b714110c

@ -11,7 +11,7 @@ export default function(attributes) {
? '""'
: attribute.chunks.length === 1 && attribute.chunks[0].type !== 'Text'
? snip(attribute.chunks[0])
: stringify_attribute(attribute);
: '`' + stringify_attribute(attribute) + '`';
return `${attribute.name}: ${value}`;
});

@ -0,0 +1,3 @@
export default {
html: `<p>Hi</p>`
};

@ -0,0 +1,7 @@
<script>
import Nested from './Nested.html';
</script>
<Nested let:value>
<p>{value}</p>
</Nested>
Loading…
Cancel
Save