Remove replaceAll
This commit is contained in:
parent
fcce57fc66
commit
bbd67acb25
1 changed files with 2 additions and 2 deletions
|
@ -871,12 +871,12 @@ import { assertNoRpc } from '../utils';
|
|||
|
||||
function sanitizeData(data: string): string {
|
||||
// Strip NL/CR so terminal dimensions don't impact tests
|
||||
data = data.replaceAll(/[\r\n]/g, '');
|
||||
data = data.replace(/[\r\n]/g, '');
|
||||
|
||||
// Strip escape sequences so winpty/conpty doesn't cause flakiness, do for all platforms for
|
||||
// consistency
|
||||
const terminalCodesRegex = /(?:\u001B|\u009B)[\[\]()#;?]*(?:(?:(?:[a-zA-Z0-9]*(?:;[a-zA-Z0-9]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-PR-TZcf-ntqry=><~]))/g;
|
||||
data = data.replaceAll(terminalCodesRegex, '');
|
||||
data = data.replace(terminalCodesRegex, '');
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue