You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nested ordered lists are exported in markdown with a wrong number sequence.
After an inner list, the next item of the outer list does not show the right number in its marker.
To reproduce the issue, run the following snippet with the current docling-core version 2.22.0.
fromdocling_core.types.doc.documentimportDoclingDocument, DocItemLabel, GroupLabeldoc=DoclingDocument(name="file")
parent=doc.add_text(parent=None, label=DocItemLabel.TITLE, text="Test")
parent_A=doc.add_group(parent=parent, name="list A", label=GroupLabel.ORDERED_LIST)
doc.add_list_item(text="Item 1 in A", enumerated=True, parent=parent_A)
doc.add_list_item(text="Item 2 in A", enumerated=True, parent=parent_A)
item_A_3=doc.add_list_item(text="Item 3 in A", enumerated=True, parent=parent_A)
parent_B=doc.add_group(parent=item_A_3, name="list B", label=GroupLabel.ORDERED_LIST)
doc.add_list_item(text="Item 1 in B", enumerated=True, parent=parent_B)
doc.add_list_item(text="Item 2 in B", enumerated=True, parent=parent_B)
doc.add_list_item(text="Item 4 in A", enumerated=True, parent=parent_A)
print(doc.export_to_markdown())
The print command shows:
# Test
1. Item 1 in A
2. Item 2 in A
3. Item 3 in A
1. Item 1 in B
2. Item 2 in B
5. Item 4 in A
while the correct output should be:
# Test
1. Item 1 in A
2. Item 2 in A
3. Item 3 in A
1. Item 1 in B
2. Item 2 in B
4. Item 4 in A
The text was updated successfully, but these errors were encountered:
Nested ordered lists are exported in markdown with a wrong number sequence.
After an inner list, the next item of the outer list does not show the right number in its marker.
To reproduce the issue, run the following snippet with the current
docling-core
version2.22.0
.The print command shows:
while the correct output should be:
The text was updated successfully, but these errors were encountered: