diff options
author | kpdecker <kpdecker@gmail.com> | 2015-09-01 00:48:20 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-09-01 00:48:20 -0500 |
commit | e7a64f018ca541a7e0ac8ab2108ed86820bb47b1 (patch) | |
tree | 9680f623156fad643bae1a38ae9de425d8fbd583 /lib/handlebars/compiler/printer.js | |
parent | 0f5061e44524a431659f0665c4cd7557af9525a0 (diff) | |
parent | 6c45f49b24d63acda37072df464bd670af97a072 (diff) | |
download | handlebars.js-e7a64f018ca541a7e0ac8ab2108ed86820bb47b1.zip handlebars.js-e7a64f018ca541a7e0ac8ab2108ed86820bb47b1.tar.gz handlebars.js-e7a64f018ca541a7e0ac8ab2108ed86820bb47b1.tar.bz2 |
Merge branch 'decorators'
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) { |