From 60306f9a833b6d4eea94ab6b8c04c35686499a5b Mon Sep 17 00:00:00 2001 From: SimJeg Date: Mon, 31 Mar 2025 16:39:40 +0200 Subject: [PATCH] Strip elements Signed-off-by: SimJeg --- 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 2291fcf2..bb90d147 100644 --- a/docling/backend/msword_backend.py +++ b/docling/backend/msword_backend.py @@ -304,7 +304,7 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend): # If the style changes for a non empty text, add the previous group if len(group_text.strip()) > 0: - paragraph_elements.append((group_text, previous_format, None)) + paragraph_elements.append((group_text.strip(), previous_format, None)) group_text = "" # If there is a hyperlink, add it immediately