Fix DOCX tables inside SDT content controls not being parsed#3658
Closed
aaarif796 wants to merge 1 commit into
Closed
Fix DOCX tables inside SDT content controls not being parsed#3658aaarif796 wants to merge 1 commit into
aaarif796 wants to merge 1 commit into
Conversation
Signed-off-by: Aarif Ansari <aaarif796@gmail.com>
Contributor
|
✅ DCO Check Passed Thanks @aaarif796, 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 commitWaiting for
This rule is failing.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Member
|
@aaarif796 Can you tell me how your fix adds compared to #3657 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Member
|
superseded by #3657 |
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 parsing of DOCX tables contained within Structured Document Tags (SDT/content controls).
Root Cause
The SDT handler processed only paragraph elements (
w:p) fromw:sdtContentand ignored table elements (w:tbl).As a result, tables embedded inside SDT content controls were flattened into plain text during DOCX conversion, causing Markdown export to lose table structure.
Fix
Handle table elements contained within
w:sdtContentand route them through_handle_tables()while preserving existing paragraph handling.Validation
TableItems.Before
Tables inside SDT blocks were flattened into text and exported as paragraphs.
After
Tables inside SDT blocks are correctly parsed and exported as Markdown tables.