Skip to content

fix: (continuation) Remove Extra Space Before and After Group Items#594

Closed
wanadzhar913 wants to merge 9 commits into
docling-project:mainfrom
wanadzhar913:bugfix/2745_ExtraSpaceBeforeAndAfterGroupItems
Closed

fix: (continuation) Remove Extra Space Before and After Group Items#594
wanadzhar913 wants to merge 9 commits into
docling-project:mainfrom
wanadzhar913:bugfix/2745_ExtraSpaceBeforeAndAfterGroupItems

Conversation

@wanadzhar913

@wanadzhar913 wanadzhar913 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Details

This is a continuation of the work in Pull Request: #458

which emoves extra space before and after group items to resolve the issue raised in #2745

Resolves #371
Resolves docling-project/docling#2745

Approach

Refactors inline spacing in docling_core/transforms/serializer/common.py into a clearer decision flow centered on _classify_inline_boundary().

_join_inline_parts() is the entry point. It walks adjacent inline chunks, calls _classify_inline_boundary() for each boundary condition, and inserts a space only when that classifier returns InlineBoundary.SPACE.

@mergify

mergify Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require two reviewer for test updates

Waiting for:

  • #approved-reviews-by >= 2
This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

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)(?:\(.+\))?(!)?:

@github-actions

github-actions Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

DCO Check Failed

Hi @wanadzhar913, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for Venkata Ramana Menda <mendavramana.jnv@gmail.com>

I, Venkata Ramana Menda <mendavramana.jnv@gmail.com>, hereby add my Signed-off-by to this commit: 0bc5d39a81dcc36b0c6480af99dffaefa0492af3"
git push

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

RamanaMenda and others added 9 commits April 28, 2026 22:33
…il.com>

I, Venkata Ramana Menda <mendavramana.jnv@gmail.com>, hereby add my Signed-off-by to this commit: 00cda36

Signed-off-by: Venkata Ramana Menda <mendavramana.jnv@gmail.com>
Signed-off-by: wanadzhar913 <adzhar.faiq@gmail.com>
…il.com>

I, Venkata Ramana Menda <mendavramana.jnv@gmail.com>, hereby add my Signed-off-by to this commit: 08049ee

Signed-off-by: wanadzhar913 <adzhar.faiq@gmail.com>
…il.com>

I, Venkata Ramana Menda <mendavramana.jnv@gmail.com>, hereby add my Signed-off-by to this commit: 08049ee

Signed-off-by: wanadzhar913 <adzhar.faiq@gmail.com>
…il.com>

I, Venkata Ramana Menda <mendavramana.jnv@gmail.com>, hereby add my Signed-off-by to this commit: 00cda36

Signed-off-by: Venkata Ramana Menda <mendavramana.jnv@gmail.com>
…il.com>

I, Venkata Ramana Menda <mendavramana.jnv@gmail.com>, hereby add my Signed-off-by to this commit: 08049ee

Signed-off-by: wanadzhar913 <adzhar.faiq@gmail.com>
…il.com>

I, Venkata Ramana Menda <mendavramana.jnv@gmail.com>, hereby add my Signed-off-by to this commit: 08049ee

Signed-off-by: wanadzhar913 <adzhar.faiq@gmail.com>
Whitespace already there?
-> don't add any

Can original source/provenance tell me?
-> trust that

Are both pieces text with styling differences?
-> use heuristics

Is one side code/formula/link?
-> usually separate it from prose with a space

Still unsure?
-> default to no inserted space

Signed-off-by: wanadzhar913 <adzhar.faiq@gmail.com>
@wanadzhar913 wanadzhar913 force-pushed the bugfix/2745_ExtraSpaceBeforeAndAfterGroupItems branch from 5317b9f to 6dd1180 Compare April 28, 2026 14:34
@wanadzhar913 wanadzhar913 marked this pull request as ready for review April 28, 2026 14:50
@wanadzhar913

Copy link
Copy Markdown
Contributor Author

Closing due to DCO check failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants