File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 * Note: Has global flag - reset lastIndex before exec() if reusing.
1919 */
2020// eslint-disable-next-line no-control-regex
21- export const ANSI_ESCAPE_PATTERN_FULL = / \x1b (?: \[ [ 0 - 9 ; ? ] * [ A - Z a - z ] | \] [ ^ \x07 \x1b ] * (?: \x07 | \x1b \\ ) | [ = > ] ) / g;
21+ export const ANSI_ESCAPE_PATTERN_FULL =
22+ / \x1b (?: \[ [ 0 - 9 ; ? ] * [ A - Z a - z ] | \] [ ^ \x07 \x1b ] * (?: \x07 | \x1b \\ ) | [ = > ] ) / g;
2223
2324/**
2425 * Simple ANSI CSI-only pattern for basic escape code stripping.
Original file line number Diff line number Diff line change @@ -4036,17 +4036,15 @@ NOW: Generate the implementation plan for the task above. Think step by step.`;
40364036 repaired = repaired . replace ( / , ( \s * [ \] } ] ) / g, '$1' ) ;
40374037 // Fix unescaped control characters within JSON strings
40384038 repaired = repaired . replace ( / " ( [ ^ " \\ ] | \\ .) * " / g, ( match ) => {
4039- return (
4040- match
4041- . replace ( / \n / g, '\\n' )
4042- . replace ( / \r / g, '\\r' )
4043- . replace ( / \t / g, '\\t' )
4044- . replace (
4045- // eslint-disable-next-line no-control-regex
4046- / [ \x00 - \x1f ] / g,
4047- ( c ) => `\\u${ c . charCodeAt ( 0 ) . toString ( 16 ) . padStart ( 4 , '0' ) } `
4048- )
4049- ) ;
4039+ return match
4040+ . replace ( / \n / g, '\\n' )
4041+ . replace ( / \r / g, '\\r' )
4042+ . replace ( / \t / g, '\\t' )
4043+ . replace (
4044+ // eslint-disable-next-line no-control-regex
4045+ / [ \x00 - \x1f ] / g,
4046+ ( c ) => `\\u${ c . charCodeAt ( 0 ) . toString ( 16 ) . padStart ( 4 , '0' ) } `
4047+ ) ;
40504048 } ) ;
40514049 parsed = JSON . parse ( repaired ) ;
40524050 } catch {
You can’t perform that action at this time.
0 commit comments