Merge branch 'compiler-options' of github.com:blakeembrey/handlebars.js into blakeembrey-compiler-options
Conflicts: lib/handlebars/compiler/javascript-compiler.js
This commit is contained in:
@@ -837,9 +837,7 @@ JavaScriptCompiler.prototype = {
|
||||
};
|
||||
},
|
||||
|
||||
// the params and contexts arguments are passed in arrays
|
||||
// to fill in
|
||||
setupParams: function(paramSize, params, useRegister) {
|
||||
setupOptions: function(paramSize, params) {
|
||||
var options = [], contexts = [], types = [], param, inverse, program;
|
||||
|
||||
options.push("hash:" + this.popStack());
|
||||
@@ -888,7 +886,14 @@ JavaScriptCompiler.prototype = {
|
||||
options.push("data:data");
|
||||
}
|
||||
|
||||
options = "{" + options.join(",") + "}";
|
||||
return options;
|
||||
},
|
||||
|
||||
// the params and contexts arguments are passed in arrays
|
||||
// to fill in
|
||||
setupParams: function(paramSize, params, useRegister) {
|
||||
var options = '{' + this.setupOptions(paramSize, params).join(',') + '}';
|
||||
|
||||
if (useRegister) {
|
||||
this.useRegister('options');
|
||||
params.push('options');
|
||||
|
||||
Reference in New Issue
Block a user