From 2a11fa4237d86e16a98ff342482b578fef8c8721 Mon Sep 17 00:00:00 2001 From: yenru0 Date: Sun, 5 Oct 2025 17:53:11 +0900 Subject: [PATCH] fix r7 radix table --- reviews/R7.md | 3 --- reviews/__pyfunc__/r7.py | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/reviews/R7.md b/reviews/R7.md index 754c62b..f9364c0 100644 --- a/reviews/R7.md +++ b/reviews/R7.md @@ -194,8 +194,5 @@ col4.append(create_radix_table(soup, "TAR",], [0, 1, 2] )) - - - print(soup) ``` \ No newline at end of file diff --git a/reviews/__pyfunc__/r7.py b/reviews/__pyfunc__/r7.py index dbdbfaf..bd85d9c 100644 --- a/reviews/__pyfunc__/r7.py +++ b/reviews/__pyfunc__/r7.py @@ -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: