Merge pull request #390 from eastridge/master
Make {data: true} a default compile option
This commit is contained in:
@@ -1040,7 +1040,9 @@ Handlebars.precompile = function(string, options) {
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
|
||||
if (!('data' in options)) {
|
||||
options.data = true;
|
||||
}
|
||||
var ast = Handlebars.parse(string);
|
||||
var environment = new Handlebars.Compiler().compile(ast, options);
|
||||
return new Handlebars.JavaScriptCompiler().compile(environment, options);
|
||||
@@ -1052,7 +1054,9 @@ Handlebars.compile = function(string, options) {
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
|
||||
if (!('data' in options)) {
|
||||
options.data = true;
|
||||
}
|
||||
var compiled;
|
||||
function compile() {
|
||||
var ast = Handlebars.parse(string);
|
||||
|
||||
Reference in New Issue
Block a user