Skip to content

Commit

Permalink
style.py: Drop unused CSS class .bold (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork authored Jul 7, 2022
1 parent e4cd422 commit 62d113b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion ansi2html/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def convert(
else:
_template = _html_template
all_styles = get_styles(self.dark_bg, self.line_wrap, self.scheme)
backgrounds = all_styles[:6]
backgrounds = all_styles[:5]
used_styles = filter(
lambda e: e.klass.lstrip(".") in attrs["styles"], all_styles
)
Expand Down
5 changes: 0 additions & 5 deletions ansi2html/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,6 @@ def get_styles(
),
Rule(".body_foreground", color=("#000000", "#AAAAAA")[dark_bg]),
Rule(".body_background", background_color=("#AAAAAA", "#000000")[dark_bg]),
Rule(
".body_foreground > .bold,.bold > .body_foreground, body.body_foreground > pre > .bold",
color=("#000000", "#FFFFFF")[dark_bg],
font_weight=("bold", "normal")[dark_bg],
),
Rule(".inv_foreground", color=("#000000", "#AAAAAA")[not dark_bg]),
Rule(".inv_background", background_color=("#AAAAAA", "#000000")[not dark_bg]),
# These effects are "SGR (Select Graphic Rendition) parameters"
Expand Down
1 change: 0 additions & 1 deletion tests/ansicolor.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
.ansi2html-content { display: inline; white-space: pre-wrap; word-wrap: break-word; }
.body_foreground { color: #AAAAAA; }
.body_background { background-color: #000000; }
.body_foreground > .bold,.bold > .body_foreground, body.body_foreground > pre > .bold { color: #FFFFFF; font-weight: normal; }
.inv_foreground { color: #000000; }
.inv_background { background-color: #AAAAAA; }
.ansi1 { font-weight: bold; }
Expand Down
1 change: 0 additions & 1 deletion tests/ansicolor_eix.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
.ansi2html-content { display: inline; white-space: pre-wrap; word-wrap: break-word; }
.body_foreground { color: #AAAAAA; }
.body_background { background-color: #000000; }
.body_foreground > .bold,.bold > .body_foreground, body.body_foreground > pre > .bold { color: #FFFFFF; font-weight: normal; }
.inv_foreground { color: #000000; }
.inv_background { background-color: #AAAAAA; }
.ansi1 { font-weight: bold; }
Expand Down
1 change: 0 additions & 1 deletion tests/produce_headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.ansi2html-content { display: inline; white-space: pre-wrap; word-wrap: break-word; }
.body_foreground { color: #AAAAAA; }
.body_background { background-color: #000000; }
.body_foreground > .bold,.bold > .body_foreground, body.body_foreground > pre > .bold { color: #FFFFFF; font-weight: normal; }
.inv_foreground { color: #000000; }
.inv_background { background-color: #AAAAAA; }
.ansi1 { font-weight: bold; }
Expand Down

0 comments on commit 62d113b

Please sign in to comment.