fix: html serialization of lists with mixed markers - #701
Conversation
Signed-off-by: Fesel Julian <78921234+julianfesel@users.noreply.github.com>
|
✅ DCO Check Passed Thanks @julianfesel, all your commits are properly signed off. 🎉 |
Merge Protections🔴 1 of 2 protections blocking · waiting on 👀 reviews
🔴 Require two reviewer for test updatesWaiting for
This rule is failing.When test data is updated, we require two reviewers
Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
|
@julianfesel are all the changes produced on the test files what you would expect? |
Signed-off-by: Fesel Julian <78921234+julianfesel@users.noreply.github.com>
Signed-off-by: Fesel Julian <78921234+julianfesel@users.noreply.github.com>
For show_original_list_item_marker=True, yes. However, based on your comment, I realized that I had misunderstood the role of marker: "" in Docling. I did not realize that it is not nullable. In the new commits, I narrowed the application of strict markers to enumerated lists that contain at least one detected marker. As a result, there is now only one change in the test cases, which I believe is correct. In my opinion, automatic enumeration does not make sense when at least one numeric marker is present. At the very least, this would require a more detailed validation. In such cases, one cannot assume that the default enumeration is correct. Furthermore, especially in OCR scenarios, the marker may actually be part of the text itself. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This PR implements option 1 of issue #699
HTML list items with an empty
markernow render withlist-style-type: none;when original markers are being shown, so the browser no longer invents numbering that is not present in theDoclingDocument.Changes
HTMLTextSerializerto suppress default list markers for unmarked list items while preserving explicit markers.