Test compilation of literal values in mustaches

This commit is contained in:
Marcio Junior
2015-02-07 18:23:03 -02:00
parent f857471cc8
commit 5cc326d425
2 changed files with 21 additions and 1 deletions
+5 -1
View File
@@ -172,7 +172,11 @@ Compiler.prototype = {
},
MustacheStatement: function(mustache) {
this.SubExpression(mustache);
if (!mustache.path.type.match(/Literal$/)) {
this.SubExpression(mustache);
} else {
this.accept(mustache.path);
}
if(mustache.escaped && !this.options.noEscape) {
this.opcode('appendEscaped');