From b3b080b22c3451fb8733c6b14c09d4e7b74e8ebc Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Tue, 20 Jun 2023 07:19:51 +0800 Subject: [PATCH] replace \r --- src/stores/useFormatter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/useFormatter.ts b/src/stores/useFormatter.ts index aae605b5..edceaf6d 100644 --- a/src/stores/useFormatter.ts +++ b/src/stores/useFormatter.ts @@ -350,7 +350,7 @@ export const useFormatter = defineStore('formatter', { } }, multiLine(v: string) { - return v ? v.replaceAll('\\n', '\n') : ''; + return v ? v.replace(/\\n|\\r/g, '\n') : ''; }, hexToString(hex: string) { if (hex) {