add custom level to buffer getIndent

This commit is contained in:
Sebastian McKenzie
2015-01-08 00:37:46 +11:00
parent 281003c7bd
commit b065d43a6d

View File

@@ -14,11 +14,11 @@ Buffer.prototype.get = function () {
return util.trimRight(this.buf);
};
Buffer.prototype.getIndent = function () {
Buffer.prototype.getIndent = function (i) {
if (this.format.compact) {
return "";
} else {
return util.repeat(this._indent, this.format.indent.style);
return util.repeat(i || this._indent, this.format.indent.style);
}
};