From e976b4575f40d46123fe9cc724d7a9316654a437 Mon Sep 17 00:00:00 2001 From: William Jin Date: Sun, 22 Sep 2024 21:28:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chyoso_toolkit_ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chyoso_toolkit_ui.py b/chyoso_toolkit_ui.py index eb84b30..c3700a2 100644 --- a/chyoso_toolkit_ui.py +++ b/chyoso_toolkit_ui.py @@ -135,8 +135,8 @@ def convert_to_docx(text): def power_shell_pdf_download(powershell_script): # 使用正则表达式去除 if-none-match 和 range 标头 - powershell_script = re.sub(r'\s*"if-none-match"="`"[^"]*`""\s*', '', powershell_script) - powershell_script = re.sub(r'\s*"range"="[^"]*"\s*', '', powershell_script) + powershell_script = re.sub(r'\s*"if-none-match"="`"[^"]*`""\s*', '\n', powershell_script) + powershell_script = re.sub(r'\s*"range"="[^"]*"\s*', '\n', powershell_script) # 在脚本最后加上 "-OutFile 1.pdf" powershell_script = powershell_script.strip() + '\n-OutFile 1.pdf'