fix r7 radix table
This commit is contained in:
@@ -194,8 +194,5 @@ col4.append(create_radix_table(soup,
|
|||||||
"TAR",], [0, 1, 2]
|
"TAR",], [0, 1, 2]
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print(soup)
|
print(soup)
|
||||||
```
|
```
|
||||||
@@ -17,6 +17,9 @@ TH_STYLE_TEMPLATE = "font-weight: normal; border: none; width: 1.2em; height: 0.
|
|||||||
def td_style_with_gray(style):
|
def td_style_with_gray(style):
|
||||||
return style + "background-color: lightgray;"
|
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):
|
def td_style_with_no_right_border(style):
|
||||||
return style + "border-right: none;"
|
return style + "border-right: none;"
|
||||||
|
|
||||||
@@ -68,6 +71,8 @@ def create_radix_table(soup: BeautifulSoup,
|
|||||||
tr = soup.new_tag("tr")
|
tr = soup.new_tag("tr")
|
||||||
for i, char in enumerate(word):
|
for i, char in enumerate(word):
|
||||||
style = TD_STYLE_TEMPLATE
|
style = TD_STYLE_TEMPLATE
|
||||||
|
if i != 0:
|
||||||
|
style = td_style_with_no_left_border(style)
|
||||||
if i != len(word) - 1:
|
if i != len(word) - 1:
|
||||||
style = td_style_with_no_right_border(style)
|
style = td_style_with_no_right_border(style)
|
||||||
if highlighted and i in highlighted:
|
if highlighted and i in highlighted:
|
||||||
|
|||||||
Reference in New Issue
Block a user