Skip to content

Commit 2eeb6bf

Browse files
committed
Update ansi-parser.ts
1 parent b13cb2c commit 2eeb6bf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/web/src/components/replay/ansi-parser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ function resetState(): ParserState {
8383
}
8484

8585
/** ESC[ followed by semicolon-separated numbers, ending with 'm' */
86+
// eslint-disable-next-line no-control-regex
8687
const ANSI_RE = /\x1b\[([0-9;]*)m/g
8788

8889
/**
@@ -92,6 +93,7 @@ const ANSI_RE = /\x1b\[([0-9;]*)m/g
9293
*/
9394
export function parseAnsi(input: string): AnsiSegment[] {
9495
// Strip non-SGR escape sequences (cursor movement, clearing, etc.)
96+
// eslint-disable-next-line no-control-regex
9597
const cleaned = input.replace(/\x1b\[[0-9;]*[A-HJKSTfhilnsu]/g, '')
9698

9799
const segments: AnsiSegment[] = []

0 commit comments

Comments
 (0)