fix attributes with mustache tag as final chunk

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

@ -203,10 +203,8 @@ function readQuotedAttributeValue ( parser, quoteMark ) {
else if ( parser.match( quoteMark ) ) { else if ( parser.match( quoteMark ) ) {
currentChunk.end = parser.index++; currentChunk.end = parser.index++;
if ( currentChunk.data ) { if ( currentChunk.data ) chunks.push( currentChunk );
chunks.push( currentChunk ); return chunks;
return chunks;
}
} }
else { else {

@ -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