mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
Update md_backend.py
Signed-off-by: Leonid Fedotov <3584432+iLeonidze@users.noreply.github.com>
This commit is contained in:
parent
9dbcb3d7d4
commit
50cbea4483
@ -247,7 +247,24 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
|
|||||||
self._process_inline_text(parent_item, doc)
|
self._process_inline_text(parent_item, doc)
|
||||||
_log.debug(" - List item")
|
_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
|
is_numbered = False
|
||||||
if (
|
if (
|
||||||
parent_item is not None
|
parent_item is not None
|
||||||
|
Loading…
Reference in New Issue
Block a user