Closed smclelland closed 8 years ago
Given this .emblem input
.my-class id="food" mistake ul li
The AST generated by calling.
Emble.parse(string);
Causes an exception down in the handlebar's compiler on line hb->compile.js:110
Uncaught TypeError: Property 'undefined' of object # is not a function
for(var i=0, l=statements.length; i<l; i++) { statement = statements[i]; this[statement.type](statement); }
Looks like in this case, Emble parse is confused by the mistake in there. It ends up with an AST that looks like:
0: {string: "<div class="my-class" id="it">mistake ul li", type: "content"} 1: "\n" 2: {string: "</div>", type: "content"}
Since item 1 isn't a valid AST entry (missing .type), handlebars compile chokes on it.
Given this .emblem input
The AST generated by calling.
Causes an exception down in the handlebar's compiler on line hb->compile.js:110
Uncaught TypeError: Property 'undefined' of object #
Looks like in this case, Emble parse is confused by the mistake in there. It ends up with an AST that looks like:
Since item 1 isn't a valid AST entry (missing .type), handlebars compile chokes on it.