@ -17,7 +17,7 @@ use helix_view::{
Theme ,
Theme ,
} ;
} ;
fn styled_multiline_text < ' a > ( text : String , style : Style ) -> Text < ' a > {
fn styled_multiline_text < ' a > ( text : & str , style : Style ) -> Text < ' a > {
let spans : Vec < _ > = text
let spans : Vec < _ > = text
. lines ( )
. lines ( )
. map ( | line | Span ::styled ( line . to_string ( ) , style ) )
. map ( | line | Span ::styled ( line . to_string ( ) , style ) )
@ -27,7 +27,7 @@ fn styled_multiline_text<'a>(text: String, style: Style) -> Text<'a> {
}
}
pub fn highlighted_code_block < ' a > (
pub fn highlighted_code_block < ' a > (
text : String ,
text : & str ,
language : & str ,
language : & str ,
theme : Option < & Theme > ,
theme : Option < & Theme > ,
config_loader : Arc < syntax ::Loader > ,
config_loader : Arc < syntax ::Loader > ,
@ -267,7 +267,7 @@ impl Markdown {
CodeBlockKind ::Indented = > "" ,
CodeBlockKind ::Indented = > "" ,
} ;
} ;
let tui_text = highlighted_code_block (
let tui_text = highlighted_code_block (
text . to_string ( ) ,
& text ,
language ,
language ,
theme ,
theme ,
Arc ::clone ( & self . config_loader ) ,
Arc ::clone ( & self . config_loader ) ,