Skip to content

Conversation

@ceberam
Copy link
Collaborator

@ceberam ceberam commented Jul 22, 2025

The HTMLListSerializer creates invalid HTML when the DoclingDocument includes nested lists.

This PR ensures that the HTMLListSerializer appends a nested list to the most recent parent list item, if it exists.

In addition, some warning messages in the regression tests have been addressed (both those intentional and unintentional)

Resolves #357

ceberam added 2 commits July 22, 2025 17:15
…st items

For a valid HTML document, the serializer should ensure that sub-list items are indented
under their respective main list items.

Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
@github-actions
Copy link
Contributor

DCO Check Passed

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

@mergify
Copy link

mergify bot commented Jul 22, 2025

Merge Protections

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

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

🟢 Require two reviewer for test updates

Wonderful, this rule succeeded.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

@ceberam ceberam changed the title Fix: html serialization nested lists Fix: HTML serialization of nested lists Jul 22, 2025
@ceberam ceberam changed the title Fix: HTML serialization of nested lists fix: HTML serialization of nested lists Jul 22, 2025
Copy link
Contributor

@dolfim-ibm dolfim-ibm left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@cau-git cau-git left a comment

Choose a reason for hiding this comment

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

LGTM

@dolfim-ibm dolfim-ibm merged commit 5a7883c into main Jul 23, 2025
12 checks passed
@dolfim-ibm dolfim-ibm deleted the fix/html-serialization-nested-lists branch July 23, 2025 07:31
@dosubot dosubot bot mentioned this pull request Aug 13, 2025
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.

HTMLListSerializer creates invalid HTML with nested lists

4 participants