mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
Remove replaceAll
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user