@@ -17,7 +17,7 @@ use helix_view::{
20−fn styled_multiline_text<'a>(text: String, style: Style) -> Text<'a> {
20+fn styled_multiline_text<'a>(text: &str, style: Style) -> Text<'a> {
21 let spans: Vec<_> = text
21 let spans: Vec<_> = text
23 .map(|line| Span::styled(line.to_string(), style))
23 .map(|line| Span::styled(line.to_string(), style))
@@ -27,7 +27,7 @@ fn styled_multiline_text<'a>(text: String, style: Style) -> Text<'a> {
29pub fn highlighted_code_block<'a>(
29pub fn highlighted_code_block<'a>(
30− text: String,
30+ text: &str,
31 language: &str,
31 language: &str,
32 theme: Option<&Theme>,
32 theme: Option<&Theme>,
33 config_loader: Arc<syntax::Loader>,
33 config_loader: Arc<syntax::Loader>,
@@ -267,7 +267,7 @@ impl Markdown {
267 CodeBlockKind::Indented => "",
267 CodeBlockKind::Indented => "",
269 let tui_text = highlighted_code_block(
269 let tui_text = highlighted_code_block(
270− text.to_string(),
270+ &text,
271 language,
271 language,
273 Arc::clone(&self.config_loader),
273 Arc::clone(&self.config_loader),