Skip to content

fix(reading-order): dehyphenate hard continuations - #3888

Open
Success6666 wants to merge 1 commit into
docling-project:mainfrom
Success6666:fix/list-item-hard-hyphen-merge
Open

fix(reading-order): dehyphenate hard continuations#3888
Success6666 wants to merge 1 commit into
docling-project:mainfrom
Success6666:fix/list-item-hard-hyphen-merge

Conversation

@Success6666

@Success6666 Success6666 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove a hard hyphen when a merged cross-element continuation begins with a lowercase character
  • retain the existing soft-hyphen behavior and preserve hard hyphens before uppercase continuations
  • add regression coverage using the production TextElement and ListItem types

Issue resolved by this Pull Request:

Resolves #3886.

Related issue

Refs #3881. The companion mapping change is in docling-project/docling-ibm-models#171.

Tests

  • uv run pytest tests/test_readingorder_hyphenated_merges.py tests/test_readingorder_table_orientation.py -q
  • uv run ruff check docling/models/stages/reading_order/readingorder_model.py tests/test_readingorder_hyphenated_merges.py
  • uv run ruff format --check docling/models/stages/reading_order/readingorder_model.py tests/test_readingorder_hyphenated_merges.py
  • uv run tach check

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

Signed-off-by: Success6666 <Success6666@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @Success6666, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@dolfim-ibm dolfim-ibm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

Reading-order hard-hyphen continuations retain an inserted space

2 participants