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