mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
enclose text/compound slot attributes in backticks - fixes #2061
This commit is contained in:
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 @@
|
||||
<slot value="Hi" />
|
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
html: `<p>Hi</p>`
|
||||
};
|
7
test/runtime/samples/component-slot-let-static/main.html
Normal file
7
test/runtime/samples/component-slot-let-static/main.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Nested from './Nested.html';
|
||||
</script>
|
||||
|
||||
<Nested let:value>
|
||||
<p>{value}</p>
|
||||
</Nested>
|
Loading…
Reference in New Issue
Block a user