From: Blair Conrad Date: Wed, 10 Jun 2020 11:31:33 +0000 (-0400) Subject: Omit superfluous g-AnsiDefault, g-AnsiBackgroundDefault classes X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=06ce242221a03d69255b65646f928db6194d8588;p=blog.git Omit superfluous g-AnsiDefault, g-AnsiBackgroundDefault classes --- diff --git a/css/m-dark+documentation.compiled.css b/css/m-dark+documentation.compiled.css index d6f1403e..056a3064 100644 --- a/css/m-dark+documentation.compiled.css +++ b/css/m-dark+documentation.compiled.css @@ -2562,7 +2562,6 @@ article:last-child, article section:last-child { margin-bottom: 0; } .m-console .g-AnsiBackgroundBrightWhite { background-color: #ffffff } .m-console .g-AnsiBackgroundBrightYellow { background-color: #fdbc4b } .m-console .g-AnsiBackgroundCyan { background-color: #1abc9c } -.m-console .g-AnsiBackgroundDefault { background-color: #fcfcfc } .m-console .g-AnsiBackgroundGreen { background-color: #11d116 } .m-console .g-AnsiBackgroundMagenta { background-color: #9b59b6 } .m-console .g-AnsiBackgroundRed { background-color: #ed1515 } @@ -2580,7 +2579,6 @@ article:last-child, article section:last-child { margin-bottom: 0; } .m-console .g-AnsiBrightWhite { color: #ffffff; font-weight: bold } .m-console .g-AnsiBrightYellow { color: #fdbc4b; font-weight: bold } .m-console .g-AnsiCyan { color: #1abc9c } -.m-console .g-AnsiDefault { color: #fcfcfc } .m-console .g-AnsiGreen { color: #11d116 } .m-console .g-AnsiMagenta { color: #9b59b6 } .m-console .g-AnsiRed { color: #ed1515 } diff --git a/css/m-dark.compiled.css b/css/m-dark.compiled.css index a5bd5365..c6727f8c 100644 --- a/css/m-dark.compiled.css +++ b/css/m-dark.compiled.css @@ -2562,7 +2562,6 @@ article:last-child, article section:last-child { margin-bottom: 0; } .m-console .g-AnsiBackgroundBrightWhite { background-color: #ffffff } .m-console .g-AnsiBackgroundBrightYellow { background-color: #fdbc4b } .m-console .g-AnsiBackgroundCyan { background-color: #1abc9c } -.m-console .g-AnsiBackgroundDefault { background-color: #fcfcfc } .m-console .g-AnsiBackgroundGreen { background-color: #11d116 } .m-console .g-AnsiBackgroundMagenta { background-color: #9b59b6 } .m-console .g-AnsiBackgroundRed { background-color: #ed1515 } @@ -2580,7 +2579,6 @@ article:last-child, article section:last-child { margin-bottom: 0; } .m-console .g-AnsiBrightWhite { color: #ffffff; font-weight: bold } .m-console .g-AnsiBrightYellow { color: #fdbc4b; font-weight: bold } .m-console .g-AnsiCyan { color: #1abc9c } -.m-console .g-AnsiDefault { color: #fcfcfc } .m-console .g-AnsiGreen { color: #11d116 } .m-console .g-AnsiMagenta { color: #9b59b6 } .m-console .g-AnsiRed { color: #ed1515 } diff --git a/css/m-light+documentation.compiled.css b/css/m-light+documentation.compiled.css index fecfcc8d..9b54c282 100644 --- a/css/m-light+documentation.compiled.css +++ b/css/m-light+documentation.compiled.css @@ -2495,7 +2495,6 @@ article:last-child, article section:last-child { margin-bottom: 0; } .m-console .g-AnsiBackgroundBrightWhite { background-color: #ffffff } .m-console .g-AnsiBackgroundBrightYellow { background-color: #fdbc4b } .m-console .g-AnsiBackgroundCyan { background-color: #1abc9c } -.m-console .g-AnsiBackgroundDefault { background-color: #fcfcfc } .m-console .g-AnsiBackgroundGreen { background-color: #11d116 } .m-console .g-AnsiBackgroundMagenta { background-color: #9b59b6 } .m-console .g-AnsiBackgroundRed { background-color: #ed1515 } @@ -2513,7 +2512,6 @@ article:last-child, article section:last-child { margin-bottom: 0; } .m-console .g-AnsiBrightWhite { color: #ffffff; font-weight: bold } .m-console .g-AnsiBrightYellow { color: #fdbc4b; font-weight: bold } .m-console .g-AnsiCyan { color: #1abc9c } -.m-console .g-AnsiDefault { color: #fcfcfc } .m-console .g-AnsiGreen { color: #11d116 } .m-console .g-AnsiMagenta { color: #9b59b6 } .m-console .g-AnsiRed { color: #ed1515 } diff --git a/css/m-light.compiled.css b/css/m-light.compiled.css index 1200d27e..8dfec38e 100644 --- a/css/m-light.compiled.css +++ b/css/m-light.compiled.css @@ -2495,7 +2495,6 @@ article:last-child, article section:last-child { margin-bottom: 0; } .m-console .g-AnsiBackgroundBrightWhite { background-color: #ffffff } .m-console .g-AnsiBackgroundBrightYellow { background-color: #fdbc4b } .m-console .g-AnsiBackgroundCyan { background-color: #1abc9c } -.m-console .g-AnsiBackgroundDefault { background-color: #fcfcfc } .m-console .g-AnsiBackgroundGreen { background-color: #11d116 } .m-console .g-AnsiBackgroundMagenta { background-color: #9b59b6 } .m-console .g-AnsiBackgroundRed { background-color: #ed1515 } @@ -2513,7 +2512,6 @@ article:last-child, article section:last-child { margin-bottom: 0; } .m-console .g-AnsiBrightWhite { color: #ffffff; font-weight: bold } .m-console .g-AnsiBrightYellow { color: #fdbc4b; font-weight: bold } .m-console .g-AnsiCyan { color: #1abc9c } -.m-console .g-AnsiDefault { color: #fcfcfc } .m-console .g-AnsiGreen { color: #11d116 } .m-console .g-AnsiMagenta { color: #9b59b6 } .m-console .g-AnsiRed { color: #ed1515 } diff --git a/css/pygments-console.css b/css/pygments-console.css index 13f03900..0446bbd8 100644 --- a/css/pygments-console.css +++ b/css/pygments-console.css @@ -10,7 +10,6 @@ .m-console .g-AnsiBackgroundBrightWhite { background-color: #ffffff } /* Generic.AnsiBackgroundBrightWhite */ .m-console .g-AnsiBackgroundBrightYellow { background-color: #fdbc4b } /* Generic.AnsiBackgroundBrightYellow */ .m-console .g-AnsiBackgroundCyan { background-color: #1abc9c } /* Generic.AnsiBackgroundCyan */ -.m-console .g-AnsiBackgroundDefault { background-color: #fcfcfc } /* Generic.AnsiBackgroundDefault */ .m-console .g-AnsiBackgroundGreen { background-color: #11d116 } /* Generic.AnsiBackgroundGreen */ .m-console .g-AnsiBackgroundMagenta { background-color: #9b59b6 } /* Generic.AnsiBackgroundMagenta */ .m-console .g-AnsiBackgroundRed { background-color: #ed1515 } /* Generic.AnsiBackgroundRed */ @@ -28,7 +27,6 @@ .m-console .g-AnsiBrightWhite { color: #ffffff; font-weight: bold } /* Generic.AnsiBrightWhite */ .m-console .g-AnsiBrightYellow { color: #fdbc4b; font-weight: bold } /* Generic.AnsiBrightYellow */ .m-console .g-AnsiCyan { color: #1abc9c } /* Generic.AnsiCyan */ -.m-console .g-AnsiDefault { color: #fcfcfc } /* Generic.AnsiDefault */ .m-console .g-AnsiGreen { color: #11d116 } /* Generic.AnsiGreen */ .m-console .g-AnsiMagenta { color: #9b59b6 } /* Generic.AnsiMagenta */ .m-console .g-AnsiRed { color: #ed1515 } /* Generic.AnsiRed */ diff --git a/css/pygments-console.py b/css/pygments-console.py index c8de4fc1..1ec0abbd 100644 --- a/css/pygments-console.py +++ b/css/pygments-console.py @@ -47,7 +47,6 @@ class ConsoleStyle(Style): Generic.AnsiMagenta: '#9b59b6', Generic.AnsiCyan: '#1abc9c', Generic.AnsiWhite: '#fcfcfc', - Generic.AnsiDefault: '#fcfcfc', Generic.AnsiBrightBlack: 'bold #7f8c8d', Generic.AnsiBrightRed: 'bold #c0392b', Generic.AnsiBrightGreen: 'bold #1cdc9a', @@ -65,7 +64,6 @@ class ConsoleStyle(Style): Generic.AnsiBackgroundMagenta: 'bg:#9b59b6', Generic.AnsiBackgroundCyan: 'bg:#1abc9c', Generic.AnsiBackgroundWhite: 'bg:#fcfcfc', - Generic.AnsiBackgroundDefault: 'bg:#fcfcfc', Generic.AnsiBackgroundBrightBlack: 'bg:#7f8c8d', Generic.AnsiBackgroundBrightRed: 'bg:#c0392b', Generic.AnsiBackgroundBrightGreen: 'bg:#1cdc9a', diff --git a/plugins/ansilexer.py b/plugins/ansilexer.py index d1b895b8..41e6a33b 100644 --- a/plugins/ansilexer.py +++ b/plugins/ansilexer.py @@ -294,7 +294,7 @@ class HtmlAnsiFormatter(HtmlFormatter): ansi_class = ansi_class[:i] html_styles.insert(0, 'color: #' + foreground_color) - if ansi_class != 'g-Ansi': + if ansi_class not in ['g-Ansi', 'g-AnsiDefault']: html_classes.insert(1, ansi_class) result = '' diff --git a/plugins/m/test/code/page.html b/plugins/m/test/code/page.html index 5858a9d5..d069cfc6 100644 --- a/plugins/m/test/code/page.html +++ b/plugins/m/test/code/page.html @@ -101,34 +101,34 @@ ASan reports: Blue rgb(255,255,0) Blue rgb(255,255,0) Named background colors: - Black Red Green Yellow Blue Magenta Cyan White Default - BrightBlack BrightRed BrightGreen BrightYellow - BrightBlue BrightMagenta BrightCyan BrightWhite + Black Red Green Yellow Blue Magenta Cyan White Default + BrightBlack BrightRed BrightGreen BrightYellow + BrightBlue BrightMagenta BrightCyan BrightWhite RGB background colors: - 91,157,217 157,217,91 217,91,157 + 91,157,217 157,217,91 217,91,157 Palette-based background colors: - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 + 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 + 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 Background colors do not heed or change brightness flag Bright BrightGreen Green - BrightGreen Black + BrightGreen Black Foreground and background colors stack: Blue on Yellow