Skip to content

Fix DOCX equation conversion with python-docx 0.8.11 - #18460

Open
LimbC-C wants to merge 1 commit into
PaddlePaddle:mainfrom
LimbC-C:fix/docx-math-legacy-version
Open

LimbC-C wants to merge 1 commit into
PaddlePaddle:mainfrom
LimbC-C:fix/docx-math-legacy-version

Conversation

@LimbC-C

@LimbC-C LimbC-C commented Nov 18, 2026

Copy link
Copy Markdown

Fixes #18459.

A DOCX containing an equation fails to convert with the supported python-docx 0.8.11 because the math helper imports its newer hyperlink module before reading any content. Defer that import until processing an actual hyperlink so formulas and surrounding text can convert.

  • Two public API regressions create real DOCX body/table equations. Both fail on the original source and pass after the fix on python-docx 0.8.11 and 1.2.0.
  • The public CLI converts the original failing file on 0.8.11, and a real equation-plus-hyperlink control passes on 1.2.0.
  • Configured changed-file checks passed, including Black and Flake8. Full repository and OCR/model integration tests were outside this local run.

AI-assisted implementation and testing with Codex.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[third-party] doc2md DOCX equations fail with python-docx 0.8.11

1 participant