fix(html): preserve text after nested list items - #4450
kamran-nizamani wants to merge 14 commits into
Conversation
|
❌ DCO Check Failed Hi @kamran-nizamani, 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 commitRun this command: git commit --allow-empty -s -m "DCO Remediation Commit for Kamran Khan <kamrannizamani35@gmail.com>
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 00c6ef6b786a2b25fe034ab03138c4d3564f9f09
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 33a20b838f95188c441cd7fad3e3b6a7805c9f5f
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 06cc0924281352ffbf5da8888f3e37a3ed8a753b
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 61c5a4d9e41f110700b44351708e3620bd95b751
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: aae632e015f712563e07720e6ca60dec602343d7
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: f02e090e9456ca6982fa2d4931b23ac99bfe1616
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 629a1dac4240865b3a27db1b386fb4d84e5f10d1
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: c7e4592ffeef763f8694552634f8f6f7ec226f58
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 2ae59b346fcd5485aa76200b25fea155bf9faa07
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: e3dec96bde4fabe6cda958b12eb57d749f3e7078"
git push🔧 Advanced: Sign off each commit directlyFor the latest commit: git commit --amend --signoff
git push --force-with-leaseFor multiple commits: git rebase --signoff origin/main
git push --force-with-leaseMore info: DCO check report |
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 00c6ef6 I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 33a20b838f95188c441cd7fad3e3b6a780c9f5f Signed-off-by: Kamran Khan <kamrannizamani35@gmail.com>
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 00c6ef6 I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 33a20b838f95188c441cd7fad3e3b6a780c9f5f I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 06cc092 Signed-off-by: Kamran Khan <kamrannizamani35@gmail.com>
|
Two things I noticed while testing this branch:
The non- |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: f02e090 I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 629a1da I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: c7e4592 I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: 2ae59b3 I, Kamran Khan <kamrannizamani35@gmail.com>, hereby add my Signed-off-by to this commit: e3dec96 Signed-off-by: Kamran Khan <kamrannizamani35@gmail.com>
|
@kamran-nizamani Thanks for your support and willingness to enhance Docling library! Before implementing a fix, we first had to agree with the new contract on floating elements inside an HTML list and this is what we are currently discussing with @morten-lagabote , the author of the issues #4422 and #4424. In addition, these issues should be best addressed together. |
|
Thanks for the clarification, @ceberam. That makes sense. I agree that it would be better to define the new contract for floating elements inside HTML lists first and address #4422 and #4424 together. I’m happy to close this PR and follow up on the agreed approach in #4422, #4424, and PR #4440. Thanks for the guidance! |
Summary
Fixes #4422.
When a list item contains a nested list or table, text that follows the nested block was previously included in the outer list item's text and emitted before the nested content.
This change:
Testing
Added regression coverage in
tests/test_backend_html.pyfor the reported nested-list case and the analogous nested-table/description-list cases.Closes #4422