diff options
author | Martin Muñoz <im.mmun@gmail.com> | 2014-11-11 21:35:10 -0500 |
---|---|---|
committer | Martin Muñoz <im.mmun@gmail.com> | 2014-11-11 21:35:10 -0500 |
commit | b8a9f7264d3b6ac48514272bf35291736cedad00 (patch) | |
tree | 08fdbc4c7e73e63f98a136285cc7a9958bec719f /lib/handlebars/compiler/helpers.js | |
parent | b3b5b358895566c04b3a9776ac81c5bcf245e27c (diff) | |
download | handlebars.js-b8a9f7264d3b6ac48514272bf35291736cedad00.zip handlebars.js-b8a9f7264d3b6ac48514272bf35291736cedad00.tar.gz handlebars.js-b8a9f7264d3b6ac48514272bf35291736cedad00.tar.bz2 |
Add parser support for block params
Diffstat (limited to 'lib/handlebars/compiler/helpers.js')
-rw-r--r-- | lib/handlebars/compiler/helpers.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/helpers.js b/lib/handlebars/compiler/helpers.js index d9b7b14..50a3c53 100644 --- a/lib/handlebars/compiler/helpers.js +++ b/lib/handlebars/compiler/helpers.js @@ -23,7 +23,7 @@ export function prepareRawBlock(openRawBlock, content, close, locInfo) { throw new Exception(openRawBlock.sexpr.id.original + " doesn't match " + close, errorNode); } - var program = new this.ProgramNode([content], {}, locInfo); + var program = new this.ProgramNode([content], null, {}, locInfo); return new this.BlockNode(openRawBlock.sexpr, program, undefined, undefined, locInfo); } @@ -40,6 +40,8 @@ export function prepareBlock(openBlock, program, inverseAndProgram, close, inver throw new Exception(openBlock.sexpr.id.original + ' doesn\'t match ' + close.path.original, errorNode); } + program.blockParams = openBlock.blockParams; + // Safely handle a chained inverse that does not have a non-conditional inverse // (i.e. both inverseAndProgram AND close are undefined) if (!close) { |