mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
Merge pull request #1446 from sveltejs/gh-1445
allow spaces around reserved words used in tags in attributes
This commit is contained in:
commit
57c0fdc6b8
@ -439,6 +439,7 @@ function readSequence(parser: Parser, done: () => boolean) {
|
||||
chunks.push(currentChunk);
|
||||
}
|
||||
|
||||
parser.allowWhitespace();
|
||||
const expression = readExpression(parser);
|
||||
parser.allowWhitespace();
|
||||
parser.eat('}', true);
|
||||
|
@ -3,11 +3,17 @@ export default {
|
||||
class: 'foo'
|
||||
},
|
||||
|
||||
html: `<div class="foo"></div>123`,
|
||||
html: `
|
||||
<div class="foo"></div>123
|
||||
<div class="foo"></div>123
|
||||
`,
|
||||
|
||||
test ( assert, component, target ) {
|
||||
component.set({ class: 'bar' });
|
||||
assert.equal( target.innerHTML, `<div class="bar"></div>123` );
|
||||
assert.htmlEqual( target.innerHTML, `
|
||||
<div class="bar"></div>123
|
||||
<div class="bar"></div>123
|
||||
` );
|
||||
|
||||
component.destroy();
|
||||
}
|
||||
|
@ -1 +1,2 @@
|
||||
<div class='{class}'></div>{123}
|
||||
<div class='{ class }'></div>{ 123 }
|
||||
|
Loading…
Reference in New Issue
Block a user