summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/handlebars/compiler/printer.js6
-rw-r--r--lib/handlebars/runtime.js7
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/handlebars/compiler/printer.js b/lib/handlebars/compiler/printer.js
index be66d73..7654245 100644
--- a/lib/handlebars/compiler/printer.js
+++ b/lib/handlebars/compiler/printer.js
@@ -10,16 +10,14 @@ export function PrintVisitor() {
PrintVisitor.prototype = new Visitor();
-PrintVisitor.prototype.pad = function(string, newline) {
+PrintVisitor.prototype.pad = function(string) {
var out = "";
for(var i=0,l=this.padding; i<l; i++) {
out = out + " ";
}
- out = out + string;
-
- if(newline !== false) { out = out + "\n"; }
+ out = out + string + "\n";
return out;
};
diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js
index 0780fbf..eb942d5 100644
--- a/lib/handlebars/runtime.js
+++ b/lib/handlebars/runtime.js
@@ -150,12 +150,11 @@ export function template(templateSpec, env) {
};
ret._child = function(i) {
- if (templateSpec.depth) {
- throw new Exception('_child can not be used with depthed methods');
+ if (templateSpec.useDepths) {
+ throw new Exception('_child can not be used with depthed templates');
}
- // TODO : Fix this
- return container.programWithDepth(i);
+ return program(container, i, templateSpec[i]);
};
return ret;
}