summaryrefslogtreecommitdiff
path: root/cli/rt/02_console.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/rt/02_console.js')
-rw-r--r--cli/rt/02_console.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/rt/02_console.js b/cli/rt/02_console.js
index 5a9dd4186..1cf47afbe 100644
--- a/cli/rt/02_console.js
+++ b/cli/rt/02_console.js
@@ -371,14 +371,14 @@
let str = "";
let j = i;
for (; j < max - 1; j++) {
- // In future, colors should be taken here into the account
- const padding = maxLineLength[j - i];
+ const lengthOfColorCodes = entries[j].length - dataLen[j];
+ const padding = maxLineLength[j - i] + lengthOfColorCodes;
str += `${entries[j]}, `[order](padding, " ");
}
if (order === "padStart") {
+ const lengthOfColorCodes = entries[j].length - dataLen[j];
const padding = maxLineLength[j - i] +
- entries[j].length -
- dataLen[j] -
+ lengthOfColorCodes -
separatorSpace;
str += entries[j].padStart(padding, " ");
} else {