feat: implement line breaks for custom helix renderer

pull/12706/head
Nikita Revenco 2025-01-27 22:03:04 +00:00
parent fa2de3222f
commit 9e26253b16
1 changed files with 6 additions and 1 deletions

View File

@ -115,7 +115,12 @@ pub fn highlighted_code_block<'a>(
style_text style_text
}; };
spans.push(Span::styled(ch.to_string(), style)); if ch == '\n' {
lines.push(Spans::from(spans));
spans = vec![];
} else {
spans.push(Span::styled(ch.to_string(), style));
}
} }
} else { } else {
let mut highlights = Vec::new(); let mut highlights = Vec::new();