diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/console/02_console.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/extensions/console/02_console.js b/extensions/console/02_console.js index 05f149cfe..6f2ed0c0e 100644 --- a/extensions/console/02_console.js +++ b/extensions/console/02_console.js @@ -79,7 +79,6 @@ MapPrototypeForEach, Error, ErrorCaptureStackTrace, - MathCeil, MathAbs, MathMax, MathMin, @@ -192,12 +191,8 @@ for (let i = 0; i < row.length; i++) { const cell = row[i]; const len = getStringWidth(cell); - const needed = (columnWidths[i] - len) / 2; - // round(needed) + ceil(needed) will always add up to the amount - // of spaces we need while also left justifying the output. - out += `${StringPrototypeRepeat(" ", needed)}${cell}${ - StringPrototypeRepeat(" ", MathCeil(needed)) - }`; + const needed = columnWidths[i] - len; + out += `${cell}${StringPrototypeRepeat(" ", needed)}`; if (i !== row.length - 1) { out += tableChars.middle; } |