fix attributes with mustache tag as final chunk

pull/31/head
Rich-Harris 8 years ago
parent a08cb44377
commit 7950d0a275

@ -203,11 +203,9 @@ function readQuotedAttributeValue ( parser, quoteMark ) {
else if ( parser.match( quoteMark ) ) {
currentChunk.end = parser.index++;
if ( currentChunk.data ) {
chunks.push( currentChunk );
if ( currentChunk.data ) chunks.push( currentChunk );
return chunks;
}
}
else {
currentChunk.data += parser.template[ parser.index++ ];

@ -0,0 +1 @@
<textarea readonly='{{readonly}}'></textarea>

@ -0,0 +1,39 @@
{
"html": {
"start": 0,
"end": 45,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 45,
"type": "Element",
"name": "textarea",
"attributes": [
{
"start": 10,
"end": 33,
"type": "Attribute",
"name": "readonly",
"value": [
{
"start": 20,
"end": 32,
"type": "MustacheTag",
"expression": {
"start": 22,
"end": 30,
"type": "Identifier",
"name": "readonly"
}
}
]
}
],
"children": []
}
]
},
"css": null,
"js": null
}
Loading…
Cancel
Save