mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 05:04:48 +00:00
fix: console.log should see color codes when grouping occurs (#7000)
This commit is contained in:
parent
732a437352
commit
67fe8cd848
3 changed files with 90 additions and 12 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue