Escape windows newline. (#45771)

Fixes #45746
This commit is contained in:
Per Osbäck 2022-02-24 17:37:49 +01:00 committed by GitHub
parent feae959c9d
commit dcd98f7819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,4 +229,4 @@ export const checkLogsError = (logRow: LogRowModel): { hasError: boolean; errorM
};
export const escapeUnescapedString = (string: string) =>
string.replace(/\\n|\\t|\\r/g, (match: string) => (match.slice(1) === 't' ? '\t' : '\n'));
string.replace(/\\r\\n|\\n|\\t|\\r/g, (match: string) => (match.slice(1) === 't' ? '\t' : '\n'));