Skip to content

Commit

Permalink
Merge pull request #42 from RapidAI/adapt_unitable_decode
Browse files Browse the repository at this point in the history
fix: adapt row&col span decode for unitable
  • Loading branch information
SWHL authored Jan 9, 2025
2 parents cf06b0e + 0037543 commit 83e5d15
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rapid_table/table_structure/table_structure_unitable.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ def decode_tokens(self, context):
td_content = td_match.group(2).strip()
if td_attrs:
decoded_list.append("<td")
decoded_list.append(" " + td_attrs)
# 可能同时存在行列合并,需要都添加
attrs_list = td_attrs.split()
for attr in attrs_list:
decoded_list.append(" " + attr)
decoded_list.append(">")
decoded_list.append("</td>")
else:
Expand Down

0 comments on commit 83e5d15

Please sign in to comment.