diff options
author | Marcio Junior <marciojunior_eu@yahoo.com.br> | 2015-02-07 18:23:03 -0200 |
---|---|---|
committer | Marcio Junior <marciojunior_eu@yahoo.com.br> | 2015-02-08 19:31:38 -0200 |
commit | 5cc326d42554da8a00c69d8a8c6a71e3e6a61371 (patch) | |
tree | e8949aa270219d6bcb3861d397e3192bc7260d0f /lib/handlebars/compiler/compiler.js | |
parent | f857471cc8dd8dca301cd78bfef03bd774b5d4c2 (diff) | |
download | handlebars.js-5cc326d42554da8a00c69d8a8c6a71e3e6a61371.zip handlebars.js-5cc326d42554da8a00c69d8a8c6a71e3e6a61371.tar.gz handlebars.js-5cc326d42554da8a00c69d8a8c6a71e3e6a61371.tar.bz2 |
Test compilation of literal values in mustaches
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 03bf8f4..75b2c1b 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -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'); |