René's URL Explorer Experiment


Title: Include cells wrapped in content controls during table traversal by sunxiuguo · Pull Request #1630 · python-openxml/python-docx · GitHub

Open Graph Title: Include cells wrapped in content controls during table traversal by sunxiuguo · Pull Request #1630 · python-openxml/python-docx

X Title: Include cells wrapped in content controls during table traversal by sunxiuguo · Pull Request #1630 · python-openxml/python-docx

Description: Summary Fixes #689. Addresses the cell-level content-control part of #1489, not its separate cached field-text problem. Word can wrap a complete table cell in w:sdt/w:sdtContent. Current traversal skips that cell, shifting extracted values into the wrong columns and sometimes making table.cell() select a cell from the following row. Traverse cell-level content controls in document order, including nested wrappers, without descending into nested tables or accepting unrelated wrappers. Use the same logical cells for row/table traversal, grid offsets, and vertical-merge lookup. Keep the generated direct-child tc_lst unchanged. Reject merges whose rectangle intersects a wrapped cell before modifying XML. The existing merge implementation assumes direct sibling cells; crossing a content control could otherwise consume the wrong cell. Ordinary merges outside the control still work. Add 22 regression cases and document the reading/merging boundary. Validation Linux, Python 3.12.14, lxml 6.1.1: pytest -q: 1,631 passed, including all 22 new cases. Unchanged master: 1,609 passed; the new regression file fails against unchanged master. Official behave --format progress --stop --tags=-wip: 67 features, 650 scenarios, 1,856 steps passed on both the final candidate and unchanged master. Ruff check and format check passed for all three changed files. Additional independent synthetic boundary checks: 302 passed, including reversed merge corners and XML unchanged on rejected merges. Save/reopen → row/table/column extraction → pandas checks restore cell positions. Reading and resaving all 19 synthetic documents leaves document XML unchanged. Pyright 1.1.401 reports no diagnostics in the changed files, but exits nonzero with one unused-ignore diagnostic in its bundled _typeshed/_type_checker_internals.pyi. The same diagnostic occurs on unchanged master; it has not been suppressed. Scope This does not add content-control authoring, cached fldSimple text extraction, or fix existing aggregate indexing for rows with omitted grid cells. No Word GUI/rendering or full multi-Python tox matrix was run. AI-assisted implementation and review; the test results above were actually executed.

Open Graph Description: Summary Fixes #689. Addresses the cell-level content-control part of #1489, not its separate cached field-text problem. Word can wrap a complete table cell in w:sdt/w:sdtContent. Current traversal ...

X Description: Summary Fixes #689. Addresses the cell-level content-control part of #1489, not its separate cached field-text problem. Word can wrap a complete table cell in w:sdt/w:sdtContent. Current traversal ...

Opengraph URL: https://github.com/python-openxml/python-docx/pull/1630

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:88b68ea4-b0da-f17e-6f7f-8f680e480cdc
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDF2C:F4C61:2B78CB:3A31B0:6AFF65D8
html-safe-nonceca070ebc6456c649ebfbed83ffe714d368a60d9483076159e2e625adc820b1b8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjJDOkY0QzYxOjJCNzhDQjozQTMxQjA6NkFGRjY1RDgiLCJ2aXNpdG9yX2lkIjoiNDg2OTM3NTkzNjE5OTM1MzgxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0168ece1c897eb8598caedb6da0e333665d53022d3416ba5dbf2a799ed863fa2
hovercard-subject-tagpull_request:4965668726
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-openxml/python-docx/pull/1630/files
twitter:imagehttps://avatars.githubusercontent.com/u/32354149?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/32354149?s=400&v=4
og:image:altSummary Fixes #689. Addresses the cell-level content-control part of #1489, not its separate cached field-text problem. Word can wrap a complete table cell in w:sdt/w:sdtContent. Current traversal ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None41b58589a1c4eda1e3c8904144a412b88ca4455f63ca2ad3629f2e9f3c3a1d12
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git
octolytics-dimension-user_id3403760
octolytics-dimension-user_loginpython-openxml
octolytics-dimension-repository_id13592924
octolytics-dimension-repository_nwopython-openxml/python-docx
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id13592924
octolytics-dimension-repository_network_root_nwopython-openxml/python-docx
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8968d6d6acc65d74e4df332d23932dd3fd0502a4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-openxml/python-docx/pull/1630/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fpull%2F1630%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fpull%2F1630%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-openxml%2Fpython-docx
Reloadhttps://github.com/python-openxml/python-docx/pull/1630/files
Reloadhttps://github.com/python-openxml/python-docx/pull/1630/files
Reloadhttps://github.com/python-openxml/python-docx/pull/1630/files
python-openxmlhttps://github.com/python-openxml
python-docxhttps://github.com/python-openxml/python-docx
Codehttps://github.com/python-openxml/python-docx
Issues387 (387)https://github.com/python-openxml/python-docx/issues
Pull requests167 (167)https://github.com/python-openxml/python-docx/pulls
Actionshttps://github.com/python-openxml/python-docx/actions
Projectshttps://github.com/python-openxml/python-docx/projects
Wikihttps://github.com/python-openxml/python-docx/wiki
Security and qualityhttps://github.com/python-openxml/python-docx/security
Insightshttps://github.com/python-openxml/python-docx/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-openxml%2Fpython-docx%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-openxml%2Fpython-docx%2Fissues%2Fnew%2Fchoose
sunxiuguohttps://github.com/sunxiuguo
python-openxml:masterhttps://github.com/python-openxml/python-docx/tree/master
sunxiuguo:fix-cell-sdt-traversalhttps://github.com/sunxiuguo/python-docx/tree/fix-cell-sdt-traversal
Conversation 0 https://github.com/python-openxml/python-docx/pull/1630
Commits 1 https://github.com/python-openxml/python-docx/pull/1630/commits
Checks 0 https://github.com/python-openxml/python-docx/pull/1630/checks
Files changed https://github.com/python-openxml/python-docx/pull/1630/files
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/1630/files
Include cells wrapped in content controls during table traversal https://github.com/python-openxml/python-docx/pull/1630/files#top
Show all changes 1 commit https://github.com/python-openxml/python-docx/pull/1630/files
ad75df4 Preserve table cells enclosed in cell-level content controls sunxiuguo Oct 22, 2026 https://github.com/python-openxml/python-docx/pull/1630/commits/ad75df4118ad6a6dd0184b2ee78b88d0219c1fb6
Clear filters https://github.com/python-openxml/python-docx/pull/1630/files
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/1630/files
Please reload this pagehttps://github.com/python-openxml/python-docx/pull/1630/files
table.py https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
table.py https://github.com/python-openxml/python-docx/pull/1630/files#diff-c72045fd67606bde7f42f67bf90e8509101c9977dc6cf9946593a6a94407d6e4
test_table_sdt.py https://github.com/python-openxml/python-docx/pull/1630/files#diff-d1e5300baa3d9b87c137401e0578fb34c7f7e2e4de06bd7042706fd34565ac70
src/docx/oxml/table.pyhttps://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
View file https://github.com/python-openxml/python-docx/blob/ad75df4118ad6a6dd0184b2ee78b88d0219c1fb6/src/docx/oxml/table.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-openxml/python-docx/pull/1630/{{ revealButtonHref }}
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
https://github.com/python-openxml/python-docx/pull/1630/files#diff-16bdd8d29c5a805d13cbf3989c2abf380cc697a8eef442fa8d1a78c35e974e74
src/docx/table.pyhttps://github.com/python-openxml/python-docx/pull/1630/files#diff-c72045fd67606bde7f42f67bf90e8509101c9977dc6cf9946593a6a94407d6e4
View file https://github.com/python-openxml/python-docx/blob/ad75df4118ad6a6dd0184b2ee78b88d0219c1fb6/src/docx/table.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-openxml/python-docx/pull/1630/{{ revealButtonHref }}
https://github.com/python-openxml/python-docx/pull/1630/files#diff-c72045fd67606bde7f42f67bf90e8509101c9977dc6cf9946593a6a94407d6e4
https://github.com/python-openxml/python-docx/pull/1630/files#diff-c72045fd67606bde7f42f67bf90e8509101c9977dc6cf9946593a6a94407d6e4
https://github.com/python-openxml/python-docx/pull/1630/files#diff-c72045fd67606bde7f42f67bf90e8509101c9977dc6cf9946593a6a94407d6e4
https://github.com/python-openxml/python-docx/pull/1630/files#diff-c72045fd67606bde7f42f67bf90e8509101c9977dc6cf9946593a6a94407d6e4
https://github.com/python-openxml/python-docx/pull/1630/files#diff-c72045fd67606bde7f42f67bf90e8509101c9977dc6cf9946593a6a94407d6e4
https://github.com/python-openxml/python-docx/pull/1630/files#diff-c72045fd67606bde7f42f67bf90e8509101c9977dc6cf9946593a6a94407d6e4
tests/test_table_sdt.pyhttps://github.com/python-openxml/python-docx/pull/1630/files#diff-d1e5300baa3d9b87c137401e0578fb34c7f7e2e4de06bd7042706fd34565ac70
View file https://github.com/python-openxml/python-docx/blob/ad75df4118ad6a6dd0184b2ee78b88d0219c1fb6/tests/test_table_sdt.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-openxml/python-docx/pull/1630/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.