fix r7 radix table

This commit is contained in:
yenru0 committed 2025-10-05 17:53:11 +09:00
1 parent aa13f159c2
commit 2a11fa4237
2 files changed
+5 -3

No files matched your search

-3
View File
@@ -194,8 +194,5 @@ col4.append(create_radix_table(soup,
"TAR",], [0, 1, 2]
))
print(soup)
```
+5
View File
@@ -17,6 +17,9 @@ TH_STYLE_TEMPLATE = "font-weight: normal; border: none; width: 1.2em; height: 0.
def td_style_with_gray(style):
return style + "background-color: lightgray;"
def td_style_with_no_left_border(style):
return style + "border-left: none;"
def td_style_with_no_right_border(style):
return style + "border-right: none;"
@@ -68,6 +71,8 @@ def create_radix_table(soup: BeautifulSoup,
tr = soup.new_tag("tr")
for i, char in enumerate(word):
style = TD_STYLE_TEMPLATE
if i != 0:
style = td_style_with_no_left_border(style)
if i != len(word) - 1:
style = td_style_with_no_right_border(style)
if highlighted and i in highlighted: