From fde33d267a8d2a93c24f7443de80a5f47a39f921 Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Thu, 10 Oct 2024 22:23:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=9A=84=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将重复的特殊字符 `—`[U+2014](https://symbl.cc/cn/2014/) 修改为 `―`[U+2015](https://symbl.cc/cn/2015/) --- app/utils/string.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/string.py b/app/utils/string.py index 9203713c9..4c0dfd22a 100644 --- a/app/utils/string.py +++ b/app/utils/string.py @@ -186,7 +186,7 @@ def clear(text: Union[list, str], replace_word: str = "", 忽略特殊字符 """ # 需要忽略的特殊字符 - CONVERT_EMPTY_CHARS = r"[、.。,,·::;;!!'’\"“”()()\[\]【】「」\-——\+\|\\_/&#~~]" + CONVERT_EMPTY_CHARS = r"[、.。,,·::;;!!'’\"“”()()\[\]【】「」\-—―\+\|\\_/&#~~]" if not text: return text if not isinstance(text, list):