markitdown
markitdown copied to clipboard
Fix: handle missing w:styleId in DOCX to prevent KeyError
Issue
Issue #1413
Some DOCX files may have headings, table cells, or footnotes without a styleId (w:styleId). The original converter crashes with:
KeyError: 'w:styleId'
Fix
Wrapped Mammoth conversion in try/except to catch missing w:styleId.
If missing, fallback safely and continue conversion.
@MonkeyCode-AI review it
@microsoft-github-policy-service agree
⏳ MonkeyCode-AI 正在分析,请稍等片刻...