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 start = parser.index;
const name = parser.readUntil( /\s*}}/ ); const name = parser.readUntil( /\s*}}/ );
if ( name && /^\w+$/.test( name ) ) { if ( name && /^[a-z]+$/.test( name ) ) {
return { return {
type: 'Identifier', type: 'Identifier',
start, start,

@ -3,11 +3,11 @@ export default {
class: 'foo' class: 'foo'
}, },
html: `<div class="foo"></div>`, html: `<div class="foo"></div>123`,
test ( assert, component, target ) { test ( assert, component, target ) {
component.set({ class: 'bar' }); component.set({ class: 'bar' });
assert.equal( target.innerHTML, `<div class="bar"></div>` ); assert.equal( target.innerHTML, `<div class="bar"></div>123` );
component.destroy(); component.destroy();
} }

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

Loading…
Cancel
Save