mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
only do special reserved name handling when tag is all lowercase letters
This commit is contained in:
parent
1dc66d403e
commit
168babe25b
@ -4,7 +4,7 @@ export default function readExpression ( parser ) {
|
||||
const start = parser.index;
|
||||
|
||||
const name = parser.readUntil( /\s*}}/ );
|
||||
if ( name && /^\w+$/.test( name ) ) {
|
||||
if ( name && /^[a-z]+$/.test( name ) ) {
|
||||
return {
|
||||
type: 'Identifier',
|
||||
start,
|
||||
|
@ -3,12 +3,12 @@ export default {
|
||||
class: 'foo'
|
||||
},
|
||||
|
||||
html: `<div class="foo"></div>`,
|
||||
html: `<div class="foo"></div>123`,
|
||||
|
||||
test ( assert, component, target ) {
|
||||
component.set({ class: 'bar' });
|
||||
assert.equal( target.innerHTML, `<div class="bar"></div>` );
|
||||
|
||||
assert.equal( target.innerHTML, `<div class="bar"></div>123` );
|
||||
|
||||
component.destroy();
|
||||
}
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
<div class='{{class}}'></div>
|
||||
<div class='{{class}}'></div>{{123}}
|
||||
|
Loading…
Reference in New Issue
Block a user