fix: extraneous empty paragraphs for test files

Signed-off-by: Michael Krissgau <michael.krissgau@ibm.com>
This commit is contained in:
Michael Krissgau 2025-06-19 21:36:39 +02:00
parent 52b8b9163f
commit a866392158

View File

@ -257,7 +257,7 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
# Check for Text after the Image # Check for Text after the Image
if ( if (
tag_name in ["p"] 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) self._handle_text_elements(element, docx_obj, doc)
# Check for the sdt containers, like table of contents # Check for the sdt containers, like table of contents