diff options
Diffstat (limited to 'lib/handlebars/compiler/printer.js')
-rw-r--r-- | lib/handlebars/compiler/printer.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/handlebars/compiler/printer.js b/lib/handlebars/compiler/printer.js index cf7aa48..66e7c7d 100644 --- a/lib/handlebars/compiler/printer.js +++ b/lib/handlebars/compiler/printer.js @@ -48,11 +48,15 @@ PrintVisitor.prototype.Program = function(program) { PrintVisitor.prototype.MustacheStatement = function(mustache) { return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); }; +PrintVisitor.prototype.Decorator = function(mustache) { + return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}'); +}; -PrintVisitor.prototype.BlockStatement = function(block) { +PrintVisitor.prototype.BlockStatement = +PrintVisitor.prototype.DecoratorBlock = function(block) { let out = ''; - out += this.pad('BLOCK:'); + out += this.pad((block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:'); this.padding++; out += this.pad(this.SubExpression(block)); if (block.program) { |