Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix docx table issue. (#5117)

Kevin Huc28bc41a96a7
diff --git a/rag/app/naive.py b/rag/app/naive.py
index 287c163b1e..152a9e7e4e 100644
--- a/rag/app/naive.py
+++ b/rag/app/naive.py
@@ -116,6 +116,8 @@ class Docx(DocxParser):
if c.text == r.cells[j].text:
span += 1
i = j
+ else:
+ break
i += 1
html += f"<td>{c.text}</td>" if span == 1 else f"<td colspan='{span}'>{c.text}</td>"
html += "</tr>"