From 4efd6713c5b30b33c497a1f85b77a7b0a7fd17e0 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Sun, 20 Jun 2021 15:09:10 -0700 Subject: Work on moving code over to LineEnding instead of assuming '\n'. Also some general cleanup and some minor fixes along the way. --- helix-term/src/ui/markdown.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'helix-term/src/ui/markdown.rs') diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs index be113747..3ce3a5b8 100644 --- a/helix-term/src/ui/markdown.rs +++ b/helix-term/src/ui/markdown.rs @@ -110,6 +110,8 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> { // TODO: replace tabs with indentation let mut slice = &text[start..end]; + // TODO: do we need to handle all unicode line endings + // here, or is just '\n' okay? while let Some(end) = slice.find('\n') { // emit span up to newline let text = &slice[..end]; -- cgit v1.2.3-70-g09d2