From a4680b2e895341e51b8809eb7e1d2f341a6e1098 Mon Sep 17 00:00:00 2001 From: XTer Date: Sun, 17 Mar 2024 20:50:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E8=AE=BE=E4=B8=BA-1=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.py b/app.py index 04eaa489..1e01eff5 100644 --- a/app.py +++ b/app.py @@ -220,6 +220,8 @@ def change_word_count(word_count): def cut_sentence_multilang(text, max_length=30): + if max_length == -1: + return text, "" # 初始化计数器 word_count = 0 in_word = False