Additional test coverage cleanup
Also fixes the template._child implementation which broke with the depthed work.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user