0
0
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:
Conduitry 2017-03-19 04:45:25 -04:00
parent 1dc66d403e
commit 168babe25b
3 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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();
}
};

View File

@ -1 +1 @@
<div class='{{class}}'></div>
<div class='{{class}}'></div>{{123}}