remove background colors from combination setters as well (#245734)

This commit is contained in:
Aaron Munger
2025-04-04 15:05:22 -07:00
committed by GitHub
parent 30ea977d8e
commit dac6e8999f
2 changed files with 10 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ export function formatStackTrace(stack: string): { formattedStack: string; error
// Remove background colors. The ones from IPython don't work well with
// themes 40-49 sets background color
cleaned = stack.replace(/\u001b\[4\dm/g, '');
cleaned = cleaned.replace(/(?<=\u001b\[[\d;]*?);4\d(?=m)/g, '');
// Also remove specific foreground colors (38 is the ascii code for picking one) (they don't translate either)
// Turn them into default foreground