修复 bug
This commit is contained in:
parent
e976b4575f
commit
fa11d92400
@ -135,11 +135,11 @@ def convert_to_docx(text):
|
|||||||
|
|
||||||
def power_shell_pdf_download(powershell_script):
|
def power_shell_pdf_download(powershell_script):
|
||||||
# 使用正则表达式去除 if-none-match 和 range 标头
|
# 使用正则表达式去除 if-none-match 和 range 标头
|
||||||
powershell_script = re.sub(r'\s*"if-none-match"="`"[^"]*`""\s*', '\n', 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)
|
powershell_script = re.sub(r'\s*"range"="[^"]*"\s*', '\n ', powershell_script)
|
||||||
|
|
||||||
# 在脚本最后加上 "-OutFile 1.pdf"
|
# 在脚本最后加上 "-OutFile 1.pdf"
|
||||||
powershell_script = powershell_script.strip() + '\n-OutFile 1.pdf'
|
powershell_script = powershell_script.strip() + ' -OutFile 1.pdf'
|
||||||
return powershell_script
|
return powershell_script
|
||||||
|
|
||||||
with gr.Blocks() as iface:
|
with gr.Blocks() as iface:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user