Repository navigation
Conversation
Signed-off-by: Prasanna Jain <prassu017@gmail.com>
|
✅ DCO Check Passed Thanks @prassu017, all your commits are properly signed off. 🎉 |
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/
|
AI triage (advisory)Checked commit The PR fixes the Markdown backend so that a list item whose first child is a nested list is kept as an empty CI safety: no concern found. A maintainer must still approve CI. The |
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the full diff at d9765b7404. It read the code and did not run it.
I found no defect. In docling/backend/md_backend.py, the new branch creates the empty item and updates the counter and list_last_item_by_ref. The child walk then keeps the new item as parent_item for the sub-list, so the sub-list goes under it and the next item is numbered correctly.
A maintainer makes the merge decision. This review never approves the pull request.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Hi @prassu017, thank you for this pull request. It has a merge conflict with git fetch upstream
git rebase upstream/main
# resolve the conflicts, then:
git push --force-with-leaseWe can continue with the review and CI after that. |
d9765b7 to
9dba76d
Compare
|
Rebased on main (31d14a7) and force-pushed 9dba76d. The only conflict was in Locally, |
In the Markdown backend, a list item is created only when its first child is a non-empty paragraph. An item with no text of its own whose first child is a sub-list (
1.followed by1. a) fell through: noListItemwas made, the sub-list was attached to the outer list group, and the next item was numbered as if the parent never existed.Such an item is now created empty right away, as the inline-group path already does, so the existing child walk puts the sub-list under it and the counter stays right.
Issue resolved by this Pull Request:
Resolves #5255
Checklist:
Review evidence:
1.\n 1. Sub-item A\n 2. Sub-item B\n2. Second itemexports1. Sub-item A\n 2. Sub-item B\n1. Second item; the sub-list group's parent is the outer list group.['', 'Sub-item A', 'Sub-item B', 'Second item']with markers1.,1.,2.,2.; the sub-list group's parent is the empty outer item, and the export is1. \n 1. Sub-item A\n 2. Sub-item B\n2. Second item.test_list_item_holding_only_a_nested_list_is_kept(ordered and bullet) fails on main and passes after.pytest tests/test_backend_markdown.py: 94 passed (includes thetests/data/mdground-truth check, no reference data changed).ruff format --checkandruff checkclean on both files; mypy onmd_backend.pyreports the same 27 errors as main (run without the project config).