Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion now.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}
],
"env": {
"VERSION": "1"
"VERSION": "1",
"FORCE_COLOR": "1"
}
}
6 changes: 3 additions & 3 deletions src/utils/generateTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ const getPosOfSeparator: (row: string, separator: string) => number[] = (
let response: number[] = [];
// Temporarily replace color codes as it breaks string.length
while (row.includes(separator)) {
row = row.replace(separator, "");
row = row.replace(separator, "~");
}

let charArray = row.split("");
charArray.forEach((char, index) => {
if (char === "") {
if (char === "~") {
response.push(index);
}
});
Expand Down Expand Up @@ -229,7 +229,7 @@ export const generateTable: (
rows.forEach((row) => {
// Temporarily replace color codes as it breaks string.length
while (row.includes(boxArt.singleVertical)) {
row = row.replace(boxArt.singleVertical, "");
row = row.replace(boxArt.singleVertical, "~");
}

let rowLength = row.length;
Expand Down