Skip to content

Preserve whitespace underlines - #2477

Merged
afourney merged 4 commits into
mainfrom
preserve_whitespace_underline
Sep 12, 2026
Merged

Preserve whitespace underlines#2477
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

Comment thread packages/markitdown-ocr/tests/test_docx_converter.py
afourney and others added 2 commits September 12, 2026 13:15
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@afourney
afourney merged commit cc0ca9e into main Sep 12, 2026
23 checks passed
@afourney
afourney deleted the preserve_whitespace_underline branch September 12, 2026 20:25
@afourney afourney changed the title Preserve whitepace underlines Preserve whitespace underlines Sep 12, 2026
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