diff --git a/compiler/parse/state/tag.js b/compiler/parse/state/tag.js index 1613fd4552..aeb58004a7 100644 --- a/compiler/parse/state/tag.js +++ b/compiler/parse/state/tag.js @@ -203,10 +203,8 @@ function readQuotedAttributeValue ( parser, quoteMark ) { else if ( parser.match( quoteMark ) ) { currentChunk.end = parser.index++; - if ( currentChunk.data ) { - chunks.push( currentChunk ); - return chunks; - } + if ( currentChunk.data ) chunks.push( currentChunk ); + return chunks; } else { diff --git a/test/parser/attribute-dynamic-boolean/input.svelte b/test/parser/attribute-dynamic-boolean/input.svelte new file mode 100644 index 0000000000..59683fecb1 --- /dev/null +++ b/test/parser/attribute-dynamic-boolean/input.svelte @@ -0,0 +1 @@ + diff --git a/test/parser/attribute-dynamic-boolean/output.json b/test/parser/attribute-dynamic-boolean/output.json new file mode 100644 index 0000000000..c4e1417c10 --- /dev/null +++ b/test/parser/attribute-dynamic-boolean/output.json @@ -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 +}