From 9c0e74c920365d436f58b099735e8e07f28b02bc Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 2 Feb 2022 23:53:50 +0100 Subject: [PATCH] style.py: Drop unused CSS class .bold --- ansi2html/converter.py | 2 +- ansi2html/style.py | 5 ----- tests/ansicolor.html | 1 - tests/ansicolor_eix.html | 1 - tests/produce_headers.txt | 1 - 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ansi2html/converter.py b/ansi2html/converter.py index 875b268..a44043d 100644 --- a/ansi2html/converter.py +++ b/ansi2html/converter.py @@ -626,7 +626,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 ) diff --git a/ansi2html/style.py b/ansi2html/style.py index 93b5601..b46adf2 100644 --- a/ansi2html/style.py +++ b/ansi2html/style.py @@ -205,11 +205,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", "#FFFFFF")[not dark_bg]), Rule(".inv_background", background_color=("#AAAAAA", "#000000")[not dark_bg]), # These effects are "SGR (Select Graphic Rendition) parameters" diff --git a/tests/ansicolor.html b/tests/ansicolor.html index 8adf6fc..a276048 100644 --- a/tests/ansicolor.html +++ b/tests/ansicolor.html @@ -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; } diff --git a/tests/ansicolor_eix.html b/tests/ansicolor_eix.html index 745f056..33f1241 100644 --- a/tests/ansicolor_eix.html +++ b/tests/ansicolor_eix.html @@ -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; } diff --git a/tests/produce_headers.txt b/tests/produce_headers.txt index b4eabfc..512b453 100644 --- a/tests/produce_headers.txt +++ b/tests/produce_headers.txt @@ -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; }