Update md_backend.py

Signed-off-by: Leonid Fedotov <3584432+iLeonidze@users.noreply.github.com>
This commit is contained in:
Leonid Fedotov 2025-06-06 16:59:05 +03:00 committed by GitHub
parent 9dbcb3d7d4
commit 50cbea4483
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -247,7 +247,24 @@ 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 = (
(lambda extractor:
(lambda node: extractor(extractor, node))
)
(
lambda self, node: (
node.children
if hasattr(node, 'children') and isinstance(node.children, str)
else ''.join(
self(self, child)
for child in node.children
)
if hasattr(node, 'children')
else str(node)
)
)
)(first_child) # type: ignore
is_numbered = False
if (
parent_item is not None