We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89c0986 commit 9ac5957Copy full SHA for 9ac5957
src/cli/utils.ts
@@ -58,13 +58,15 @@ export const prependTabs = (value: string) =>
58
59
export const formatCliMessage = (value: string): string => {
60
const tagToColorMap = {
61
- m: 'magenta',
62
c: 'cyan',
63
g: 'green',
+ m: 'magenta',
64
r: 'red',
65
y: 'yellow',
66
} as const;
67
- const regexp = new RegExp(`<((${Object.keys(tagToColorMap).join('|')}))>(.*?)</\\2>`, 'g');
+
68
+ const allTags = `[${Object.keys(tagToColorMap).join('')}]`;
69
+ const regexp = new RegExp(`<((${allTags}))>(.*?)</\\2>`, 'g');
70
71
return stripIndent(value.replaceAll(regexp,
72
(substring, _, tag: keyof typeof tagToColorMap, tagContents) => {
0 commit comments