Skip to content

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

Fix QA DOCX table parser dropping cells between repeated text (#17497)

Yash Raj Pandey33bfc11fa43d
diff --git a/rag/app/qa.py b/rag/app/qa.py
index 5339f579f1..d9166057a3 100644
--- a/rag/app/qa.py
+++ b/rag/app/qa.py
@@ -229,6 +229,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>"