mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Highlight after special-casing repl snippets
Signed-off-by: Richard Feldman <oss@rtfeldman.com>
This commit is contained in:
parent
e2dac4f022
commit
615975b30a
1 changed files with 2 additions and 3 deletions
|
@ -14,7 +14,6 @@ pub fn highlight_roc_code_inline(code: &str) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn highlight(code: &str) -> Vec<String> {
|
pub fn highlight(code: &str) -> Vec<String> {
|
||||||
let locations: Vec<Loc<Token>> = roc_parse::highlight::highlight(code);
|
|
||||||
let mut buf: Vec<String> = Vec::new();
|
let mut buf: Vec<String> = Vec::new();
|
||||||
let mut offset = 0;
|
let mut offset = 0;
|
||||||
|
|
||||||
|
@ -30,7 +29,7 @@ pub fn highlight(code: &str) -> Vec<String> {
|
||||||
code
|
code
|
||||||
};
|
};
|
||||||
|
|
||||||
for location in locations {
|
for location in roc_parse::highlight::highlight(code) {
|
||||||
let current_text = &code[offset..location.byte_range().end];
|
let current_text = &code[offset..location.byte_range().end];
|
||||||
|
|
||||||
match location.value {
|
match location.value {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue