From a81faacfc990d92ec2b22db6d4edf5d13492b1a0 Mon Sep 17 00:00:00 2001 From: Rafael Teixeira de Lima Date: Wed, 19 Mar 2025 09:06:10 +0100 Subject: [PATCH] Add message Signed-off-by: Rafael Teixeira de Lima --- docling/backend/msword_backend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docling/backend/msword_backend.py b/docling/backend/msword_backend.py index 1ba0fd7d..78fe7df8 100644 --- a/docling/backend/msword_backend.py +++ b/docling/backend/msword_backend.py @@ -276,7 +276,9 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend): texts_and_equations.append(latex_equation) if "".join(only_texts).strip() != text.strip(): - return text, only_equations + # If we are not able to reconstruct the initial raw text + # do not try to parse equations and return the original + return text, [] return "".join(texts_and_equations), only_equations