From a866392158b9bf23682b6c75e54d393a090dd720 Mon Sep 17 00:00:00 2001 From: Michael Krissgau Date: Thu, 19 Jun 2025 21:36:39 +0200 Subject: [PATCH] fix: extraneous empty paragraphs for test files Signed-off-by: Michael Krissgau --- docling/backend/msword_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docling/backend/msword_backend.py b/docling/backend/msword_backend.py index ee51e98a..ec071ef8 100644 --- a/docling/backend/msword_backend.py +++ b/docling/backend/msword_backend.py @@ -257,7 +257,7 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend): # Check for Text after the Image if ( tag_name in ["p"] - or element.find(".//w:p", namespaces=namespaces) is not None + and element.find(".//w:t", namespaces=namespaces) is not None ): self._handle_text_elements(element, docx_obj, doc) # Check for the sdt containers, like table of contents