fix: resolving issue 3655 for rich tables in docx#3657
Merged
Conversation
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Contributor
|
✅ DCO Check Passed Thanks @PeterStaar-IBM, all your commits are properly signed off. 🎉 |
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 Require two reviewer for test updatesWonderful, this rule succeeded.When test data is updated, we require two reviewers
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ceberam
requested changes
Jun 19, 2026
ceberam
left a comment
Member
There was a problem hiding this comment.
Looks good.
@PeterStaar-IBM can you just add the groundtruth files for the new test file docx_rich_tables_01.docx ? They should be:
tests/data/groundtruth/docling_v2/docx_rich_tables_01.docx.itxt
tests/data/groundtruth/docling_v2/docx_rich_tables_01.docx.json
tests/data/groundtruth/docling_v2/docx_rich_tables_01.docx.md
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
dolfim-ibm
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix DOCX table extraction when tables are wrapped in block-level SDT content controls.
Some DOCX files store real
w:tblelements insidew:sdtContent. The MS Word backend previously handled block-level
w:sdtby extracting every nested paragraph directly, which preserved the table text but flattened thetable structure. This change recursively walks the direct
w:sdtContentchildren so nested tables reach theexisting table parser.
Changes
w:sdtContentinMsWordDocumentBackend._walk_linear.docx_rich_tables_01.docx.FeatureAction NeededComment/LinksPhase 1andPhase 2text markers.resolves: #3655