Fix docx table issue. (#5117)
### 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
29a59ed7e2
commit
c28bc41a96
1 changed files with 2 additions and 0 deletions
|
|
@ -116,6 +116,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…
Add table
Reference in a new issue