Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
feat: prevent circular inheritance in DOCX style processing by tracking visited styles
myhloli595912d044a8
diff --git a/mineru/model/docx/docx_converter.py b/mineru/model/docx/docx_converter.pyindex 284286a7..ff1369b0 100644--- a/mineru/model/docx/docx_converter.py+++ b/mineru/model/docx/docx_converter.py@@ -1947,7 +1947,21 @@ class DocxConverter:style = style_objresult = None+ visited_styles = set()while style is not None:+ style_element = getattr(style, "_element", None)+ style_id = getattr(style, "style_id", None)+ style_type = getattr(style, "type", None)+ # DOCX 可能存在 basedOn 自引用或环形引用,记录已访问样式避免继承链死循环。+ style_marker = (+ id(style_element) if style_element is not None else id(style),+ style_type,+ style_id,+ )+ if style_marker in visited_styles:+ break+ visited_styles.add(style_marker)+font = getattr(style, "font", None)if font is not None:if attr_name == "underline":