From 331c6ab466dcf35f37447a4e63310230a5f33545 Mon Sep 17 00:00:00 2001 From: Rafael Teixeira de Lima Date: Wed, 2 Apr 2025 11:29:14 +0200 Subject: [PATCH] Fix trailing space Signed-off-by: Rafael Teixeira de Lima --- docling/backend/msword_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docling/backend/msword_backend.py b/docling/backend/msword_backend.py index 34cdaec8..8b553828 100644 --- a/docling/backend/msword_backend.py +++ b/docling/backend/msword_backend.py @@ -412,8 +412,8 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend): if len(text_tmp) == 0: break - pre_eq_text = text_tmp.split(eq, maxsplit=1)[0] - text_tmp = text_tmp.split(eq, maxsplit=1)[1] + pre_eq_text = text_tmp.split(eq.strip(), maxsplit=1)[0] + text_tmp = text_tmp.split(eq.strip(), maxsplit=1)[1] if len(pre_eq_text) > 0: doc.add_text( label=DocItemLabel.PARAGRAPH,