only do special reserved name handling when tag is all lowercase letters

pull/394/head
Conduitry 8 years ago
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,11 +3,11 @@ 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…
Cancel
Save