From 1c933e20f869b48e28b2cc06692653483b673e45 Mon Sep 17 00:00:00 2001 From: Maksym Lysak Date: Fri, 25 Oct 2024 09:44:34 +0200 Subject: [PATCH] Small fix to properly handle trailing inline text in the md backend Signed-off-by: Maksym Lysak --- docling/backend/md_backend.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docling/backend/md_backend.py b/docling/backend/md_backend.py index e2d26754..0a6c72f9 100644 --- a/docling/backend/md_backend.py +++ b/docling/backend/md_backend.py @@ -286,6 +286,7 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend): parsed_ast = marko_parser.parse(self.markdown) # Start iterating from the root of the AST self.iterate_elements(parsed_ast, 0, doc, None) + self.process_inline_text(None, doc) # handle last hanging inline text else: raise RuntimeError( f"Cannot convert md with {self.document_hash} because the backend failed to init."