From 6f17c9be886076577dad520f88abc1084296f863 Mon Sep 17 00:00:00 2001 From: xunbu Date: Wed, 24 Sep 2025 22:11:52 +0800 Subject: [PATCH] =?UTF-8?q?pdf=E8=A7=A3=E6=9E=90=E7=8E=B0=E5=9C=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=BF=BB=E8=AF=91=E5=89=8D=E7=9A=84=E7=BB=93?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docutranslate/workflow/md_based_workflow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docutranslate/workflow/md_based_workflow.py b/docutranslate/workflow/md_based_workflow.py index 3055652..8f5f03c 100644 --- a/docutranslate/workflow/md_based_workflow.py +++ b/docutranslate/workflow/md_based_workflow.py @@ -74,12 +74,12 @@ class MarkdownBasedWorkflow(Workflow[MarkdownBasedWorkflowConfig, Document, Mark converter = converter_class(convert_config) else: raise ValueError(f"不存在{convert_engin}解析引擎") - document_md = converter.convert(self.document_original) + document_md :Document= converter.convert(self.document_original) if hasattr(converter,"attachments"): for attachment in converter.attachments: self.attachment.add_attachment(attachment) - # 获取缓存解析后文件 - md_based_convert_cacher.cache_result(document_md, self.document_original, convert_engin, convert_config) + # 缓存解析后文件 + md_based_convert_cacher.cache_result(document_md.copy(), self.document_original, convert_engin, convert_config) return document_md