From 615975b30a75410cca74996a935c2278a23e92bd Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Mon, 22 Jan 2024 23:58:38 -0500 Subject: [PATCH] Highlight after special-casing repl snippets Signed-off-by: Richard Feldman --- crates/highlight/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/highlight/src/lib.rs b/crates/highlight/src/lib.rs index 0928e1a04c..d077315941 100644 --- a/crates/highlight/src/lib.rs +++ b/crates/highlight/src/lib.rs @@ -14,7 +14,6 @@ pub fn highlight_roc_code_inline(code: &str) -> String { } pub fn highlight(code: &str) -> Vec { - let locations: Vec> = roc_parse::highlight::highlight(code); let mut buf: Vec = Vec::new(); let mut offset = 0; @@ -29,8 +28,8 @@ pub fn highlight(code: &str) -> Vec { } else { code }; - - for location in locations { + + for location in roc_parse::highlight::highlight(code) { let current_text = &code[offset..location.byte_range().end]; match location.value {