mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-07-12 13:31:48 +08:00
Fix: abnormal cell mergeing. (#6991)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
23c5ce48d1
commit
ed5f81b02e
@ -133,7 +133,7 @@ class TableStructureRecognizer(Recognizer):
|
|||||||
return "Ot"
|
return "Ot"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def construct_table(boxes, is_english=False, html=False, **kwargs):
|
def construct_table(boxes, is_english=False, html=True, **kwargs):
|
||||||
cap = ""
|
cap = ""
|
||||||
i = 0
|
i = 0
|
||||||
while i < len(boxes):
|
while i < len(boxes):
|
||||||
|
@ -162,6 +162,8 @@ class Docx(DocxParser):
|
|||||||
if c.text == r.cells[j].text:
|
if c.text == r.cells[j].text:
|
||||||
span += 1
|
span += 1
|
||||||
i = j
|
i = j
|
||||||
|
else:
|
||||||
|
break
|
||||||
i += 1
|
i += 1
|
||||||
html += f"<td>{c.text}</td>" if span == 1 else f"<td colspan='{span}'>{c.text}</td>"
|
html += f"<td>{c.text}</td>" if span == 1 else f"<td colspan='{span}'>{c.text}</td>"
|
||||||
html += "</tr>"
|
html += "</tr>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user