Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adapt row&col span decode for unitable #42

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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