mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-30 14:04:27 +00:00
Small fix to properly handle trailing inline text in the md backend
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
This commit is contained in:
parent
8d356aa247
commit
1c933e20f8
@ -286,6 +286,7 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
|
|||||||
parsed_ast = marko_parser.parse(self.markdown)
|
parsed_ast = marko_parser.parse(self.markdown)
|
||||||
# Start iterating from the root of the AST
|
# Start iterating from the root of the AST
|
||||||
self.iterate_elements(parsed_ast, 0, doc, None)
|
self.iterate_elements(parsed_ast, 0, doc, None)
|
||||||
|
self.process_inline_text(None, doc) # handle last hanging inline text
|
||||||
else:
|
else:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
f"Cannot convert md with {self.document_hash} because the backend failed to init."
|
f"Cannot convert md with {self.document_hash} because the backend failed to init."
|
||||||
|
Loading…
Reference in New Issue
Block a user