From c28bc41a96a7d4e42fc2cb28cae6e23089e5f87f Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Wed, 19 Feb 2025 12:40:06 +0800 Subject: [PATCH] Fix docx table issue. (#5117) ### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/app/naive.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rag/app/naive.py b/rag/app/naive.py index 287c163b1..152a9e7e4 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"{c.text}" if span == 1 else f"{c.text}" html += ""