Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

fix: ensure section end detection in docx_converter.py is accurate

myhloli5d56c9355986
diff --git a/mineru/model/docx/docx_converter.py b/mineru/model/docx/docx_converter.py
index 22d90442..c730c993 100644
--- a/mineru/model/docx/docx_converter.py
+++ b/mineru/model/docx/docx_converter.py
@@ -399,7 +399,7 @@ class DocxConverter:
"""
is_section_end = False
- if element.find(".//w:sectPr", namespaces=DocxConverter._BLIP_NAMESPACES):
+ if element.find(".//w:sectPr", namespaces=DocxConverter._BLIP_NAMESPACES) is not None:
# 如果没有text内容
if element.text == "":
self.cur_page = []