diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts index 074f790b65..4a0d050144 100644 --- a/src/parse/state/tag.ts +++ b/src/parse/state/tag.ts @@ -439,6 +439,7 @@ function readSequence(parser: Parser, done: () => boolean) { chunks.push(currentChunk); } + parser.allowWhitespace(); const expression = readExpression(parser); parser.allowWhitespace(); parser.eat('}', true); diff --git a/test/runtime/samples/attribute-dynamic-reserved/_config.js b/test/runtime/samples/attribute-dynamic-reserved/_config.js index e0e349b7bc..cd597ad004 100644 --- a/test/runtime/samples/attribute-dynamic-reserved/_config.js +++ b/test/runtime/samples/attribute-dynamic-reserved/_config.js @@ -3,11 +3,17 @@ export default { class: 'foo' }, - html: `
123`, + html: ` + 123 + 123 + `, test ( assert, component, target ) { component.set({ class: 'bar' }); - assert.equal( target.innerHTML, `123` ); + assert.htmlEqual( target.innerHTML, ` + 123 + 123 + ` ); component.destroy(); } diff --git a/test/runtime/samples/attribute-dynamic-reserved/main.html b/test/runtime/samples/attribute-dynamic-reserved/main.html index f0318b96de..3909ae60b6 100644 --- a/test/runtime/samples/attribute-dynamic-reserved/main.html +++ b/test/runtime/samples/attribute-dynamic-reserved/main.html @@ -1 +1,2 @@ {123} +{ 123 }