Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docx): fix short-row DOCX table #2943

Merged
merged 3 commits into from May 2, 2024
Merged

Conversation

scanny
Copy link
Collaborator

@scanny scanny commented Apr 27, 2024

Summary
The DOCX format allows a table row to start late and/or end early, meaning cells at the beginning or end of a row can be omitted. While there are legitimate uses for this capability, using it in practice is relatively rare. However, it can happen unintentionally when adjusting cell borders with the mouse. Accommodate this case and generate accurate .text and .metadata.text_as_html for these tables.

@scanny scanny changed the title spike: fix short-row DOCX table fix(docx): fix short-row DOCX table Apr 27, 2024
@scanny
Copy link
Collaborator Author

scanny commented Apr 27, 2024

Fixes #709.

@scanny scanny force-pushed the scanny/fix-docx-short-table-rows branch 2 times, most recently from 0db3eeb to 7ce80df Compare April 29, 2024 18:34
@scanny scanny marked this pull request as draft April 30, 2024 06:30
@scanny scanny force-pushed the scanny/fix-docx-short-table-rows branch from 7ce80df to 25e29cd Compare April 30, 2024 06:31
@scanny scanny changed the base branch from main to scanny/bump-docx-dependency April 30, 2024 06:37
@scanny scanny force-pushed the scanny/bump-docx-dependency branch 3 times, most recently from ce866d5 to d3c9c7f Compare May 1, 2024 20:55
Base automatically changed from scanny/bump-docx-dependency to main May 1, 2024 22:16
Version 1.1.1 of `python-docx` added "built-in" type support so we don't
need these anymore.
@scanny scanny force-pushed the scanny/fix-docx-short-table-rows branch from 49b4311 to 15430c2 Compare May 1, 2024 23:53
@scanny scanny marked this pull request as ready for review May 1, 2024 23:54
@scanny scanny added this pull request to the merge queue May 2, 2024
Merged via the queue into main with commit 601594d May 2, 2024
42 checks passed
@scanny scanny deleted the scanny/fix-docx-short-table-rows branch May 2, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants