File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,9 +95,6 @@ impl Term {
9595 use std:: fmt:: Write as _;
9696 use unicode_width:: UnicodeWidthStr as _;
9797
98- const FG : & str = "fg" ;
99- const BG : & str = "bg" ;
100-
10198 let mut styled = adapter:: AnsiBytes :: new ( ) ;
10299 let mut elements = styled. extract_next ( ansi. as_bytes ( ) ) . collect :: < Vec < _ > > ( ) ;
103100 preprocess_invert_style ( & mut elements, self . bg_color , self . fg_color ) ;
@@ -215,9 +212,6 @@ impl Term {
215212 pub fn render_html ( & self , ansi : & str ) -> String {
216213 use std:: fmt:: Write as _;
217214
218- const FG : & str = "fg" ;
219- const BG : & str = "bg" ;
220-
221215 let mut styled = adapter:: AnsiBytes :: new ( ) ;
222216 let mut elements = styled. extract_next ( ansi. as_bytes ( ) ) . collect :: < Vec < _ > > ( ) ;
223217 preprocess_invert_style ( & mut elements, self . bg_color , self . fg_color ) ;
@@ -515,6 +509,8 @@ fn rgb_value(color: anstyle::Color, palette: Palette) -> String {
515509 format ! ( "#{r:02X}{g:02X}{b:02X}" )
516510}
517511
512+ const FG : & str = "fg" ;
513+ const BG : & str = "bg" ;
518514const FG_PREFIX : & str = "fg" ;
519515const BG_PREFIX : & str = "bg" ;
520516const UNDERLINE_PREFIX : & str = "underline" ;
You can’t perform that action at this time.
0 commit comments