From d1023b57e6ad55d3645dfd03ed32e0f4c229aa51 Mon Sep 17 00:00:00 2001 From: Bruno Rigal Date: Mon, 23 Jun 2025 14:31:48 +0000 Subject: [PATCH] fix:missing elements in markdown lists Signed-off-by: Bruno Rigal --- docling/backend/md_backend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docling/backend/md_backend.py b/docling/backend/md_backend.py index fbe17ee0..7ab9b154 100644 --- a/docling/backend/md_backend.py +++ b/docling/backend/md_backend.py @@ -247,7 +247,9 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend): self._process_inline_text(parent_item, doc) _log.debug(" - List item") - snippet_text = str(first_child.children[0].children) # type: ignore + snippet_text = ( + marko.md_renderer.MarkdownRenderer().render(first_child).strip() + ) # type: ignore is_numbered = False if ( parent_item is not None