mirror of https://github.com/sveltejs/svelte
parse @id for keyed each blocks (#81)
parent
4332310550
commit
8340583fa1
@ -0,0 +1,3 @@
|
|||||||
|
{{#each todos as todo @id}}
|
||||||
|
<p>{{todo}}</p>
|
||||||
|
{{/each}}
|
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"html": {
|
||||||
|
"start": 0,
|
||||||
|
"end": 54,
|
||||||
|
"type": "Fragment",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"start": 0,
|
||||||
|
"end": 54,
|
||||||
|
"type": "EachBlock",
|
||||||
|
"expression": {
|
||||||
|
"start": 8,
|
||||||
|
"end": 13,
|
||||||
|
"type": "Identifier",
|
||||||
|
"name": "todos"
|
||||||
|
},
|
||||||
|
"context": "todo",
|
||||||
|
"key": "id",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"start": 29,
|
||||||
|
"end": 44,
|
||||||
|
"type": "Element",
|
||||||
|
"name": "p",
|
||||||
|
"attributes": [],
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"start": 32,
|
||||||
|
"end": 40,
|
||||||
|
"type": "MustacheTag",
|
||||||
|
"expression": {
|
||||||
|
"start": 34,
|
||||||
|
"end": 38,
|
||||||
|
"type": "Identifier",
|
||||||
|
"name": "todo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"css": null,
|
||||||
|
"js": null
|
||||||
|
}
|
Loading…
Reference in new issue