Skip to content

Preserve whitespace underlines - #2477

Merged
Adam Fourney (afourney) merged 4 commits into
mainfrom
preserve_whitespace_underline
Sep 12, 2026
Merged

Adam Fourney (afourney) merged 4 commits into
mainfrom
preserve_whitespace_underline

Conversation

@afourney

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused implementation is covered across direct HTML, standard DOCX, and OCR conversion paths.

Pull request overview

Preserves whitespace-only underlined content during HTML and DOCX conversion.

Changes:

  • Bypasses underline trimming for whitespace-only text.
  • Adds HTML, DOCX, and OCR regression coverage.
File summaries
File Description
packages/markitdown/src/markitdown/converters/_markdownify.py Preserves whitespace-only underline contents.
packages/markitdown/tests/test_html_converter.py Tests HTML underline whitespace handling.
packages/markitdown/tests/test_module_misc.py Tests DOCX whitespace-only underlined runs.
packages/markitdown-ocr/tests/test_docx_converter.py Tests equivalent OCR converter behavior.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The OCR line-break test has an inconsistent expected value that will fail.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

@afourney
Adam Fourney (afourney) merged commit cc0ca9e into main Sep 12, 2026
23 checks passed
@afourney
Adam Fourney (afourney) deleted the preserve_whitespace_underline branch September 12, 2026 20:25
@afourney Adam Fourney (afourney) changed the title Preserve whitepace underlines Preserve whitespace underlines Sep 12, 2026
San-Hsien (SanHsien) pushed a commit to SanHsien/markitdown that referenced this pull request Sep 30, 2026
* Preserve whitespace underlines

(cherry picked from commit cc0ca9e)
San-Hsien (SanHsien) added a commit to SanHsien/markitdown that referenced this pull request Sep 30, 2026
…issue microsoft#2567

Adopt microsoft#2462, microsoft#2464, microsoft#2466, microsoft#2467, microsoft#2469, microsoft#2476 and microsoft#2477 via cherry-pick;
record remaining items as adoption pending or not applicable.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.

2 participants