aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/markdown.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-05-27 15:00:51 +0000
committerBlaž Hrastnik2021-05-27 15:00:51 +0000
commit094203c74e19d49b3bfc74cf2ab4f853a773c195 (patch)
tree707927ed1734a504131450a84bdf71d76baf7585 /helix-term/src/ui/markdown.rs
parentb114cfa119bc94396f1ed38109a51183035574ed (diff)
Update deps, introduce the new tree-sitter lifetimes
Diffstat (limited to 'helix-term/src/ui/markdown.rs')
-rw-r--r--helix-term/src/ui/markdown.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs
index 8d14841e..daac173d 100644
--- a/helix-term/src/ui/markdown.rs
+++ b/helix-term/src/ui/markdown.rs
@@ -107,6 +107,8 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> {
None => text_style,
};
+ // TODO: replace tabs with indentation
+
let mut slice = &text[start..end];
while let Some(end) = slice.find('\n') {
// emit span up to newline
@@ -153,6 +155,7 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> {
}
}
Event::Code(text) | Event::Html(text) => {
+ log::warn!("code {:?}", text);
let mut span = to_span(text);
span.style = code_style;
spans.push(span);
@@ -167,7 +170,9 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> {
lines.push(Spans::default());
}
// TaskListMarker(bool) true if checked
- _ => (),
+ _ => {
+ log::warn!("unhandled markdown event {:?}", event);
+ }
}
// build up a vec of Paragraph tui widgets
}