mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-30 14:04:27 +00:00
Fixing function return
Signed-off-by: Rafael Teixeira de Lima <Rafael.td.lima@gmail.com>
This commit is contained in:
parent
54a78c307d
commit
4f284b3746
@ -275,8 +275,8 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
|
||||
only_equations.append(latex_equation)
|
||||
texts_and_equations.append(latex_equation)
|
||||
|
||||
if "".join(only_texts) != text:
|
||||
return text
|
||||
if "".join(only_texts).strip() != text.strip():
|
||||
return text, only_equations
|
||||
|
||||
return "".join(texts_and_equations), only_equations
|
||||
|
||||
@ -365,6 +365,7 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
|
||||
for eq in equations:
|
||||
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]
|
||||
if len(pre_eq_text) > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user