mirror of https://github.com/sveltejs/svelte
fix AST .end index for expressions in attributes (#6542)
parent
8b09e6181a
commit
d9da22ac04
@ -0,0 +1 @@
|
||||
<input foo=a{1} />
|
@ -0,0 +1,55 @@
|
||||
{
|
||||
"html": {
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"type": "Fragment",
|
||||
"children": [
|
||||
{
|
||||
"start": 0,
|
||||
"end": 18,
|
||||
"type": "Element",
|
||||
"name": "input",
|
||||
"attributes": [
|
||||
{
|
||||
"start": 7,
|
||||
"end": 15,
|
||||
"type": "Attribute",
|
||||
"name": "foo",
|
||||
"value": [
|
||||
{
|
||||
"start": 11,
|
||||
"end": 12,
|
||||
"type": "Text",
|
||||
"raw": "a",
|
||||
"data": "a"
|
||||
},
|
||||
{
|
||||
"start": 12,
|
||||
"end": 15,
|
||||
"type": "MustacheTag",
|
||||
"expression": {
|
||||
"type": "Literal",
|
||||
"start": 13,
|
||||
"end": 14,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in new issue