From b065d43a6d7edc60419de48798d5edd914dd5671 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 8 Jan 2015 00:37:46 +1100 Subject: [PATCH] add custom level to buffer getIndent --- lib/6to5/generation/buffer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/6to5/generation/buffer.js b/lib/6to5/generation/buffer.js index afd9c4dd23..fdd53b0659 100644 --- a/lib/6to5/generation/buffer.js +++ b/lib/6to5/generation/buffer.js @@ -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); } };