Add support for inverted sections in the parser

This commit is contained in:
wycats
2010-12-03 00:54:18 -05:00
parent 87b526df27
commit 8f6f3051e6
5 changed files with 27 additions and 5 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ Handlebars.PrintVisitor.prototype.program = function(program) {
Handlebars.PrintVisitor.prototype.block = function(block) {
var out = "";
out = out + this.pad("BLOCK:");
out = out + (block.inverted ? this.pad("INVERSE:") : this.pad("BLOCK:"));
this.padding++;
out = out + this.accept(block.mustache);
out = out + this.accept(block.program);