diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-06-13 23:16:40 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-06-14 13:53:02 +0200 |
| commit | c81e2a5f56eb262663f292578c683fba7f18251f (patch) | |
| tree | 6c045a8dcbec5e75e01a15f970ef8cee6ff042d0 /src/syntax/highlight.rs | |
| parent | 891af17260a6750a74a102388a05e59cf1ffc3c1 (diff) | |
Many fixes
Diffstat (limited to 'src/syntax/highlight.rs')
| -rw-r--r-- | src/syntax/highlight.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/syntax/highlight.rs b/src/syntax/highlight.rs index 630a451d..f6256d2a 100644 --- a/src/syntax/highlight.rs +++ b/src/syntax/highlight.rs @@ -60,7 +60,7 @@ where highlight_themed_impl(text, 0, &root, vec![], &highlighter, &mut f); } -/// Recursive implementation for returning syntect styles. +/// Recursive implementation for highlighting with a syntect theme. fn highlight_themed_impl<F>( text: &str, mut offset: usize, @@ -273,7 +273,7 @@ impl Category { NodeKind::None => Some(Category::None), NodeKind::Auto => Some(Category::Auto), NodeKind::Ident(_) => match parent.kind() { - NodeKind::Markup(_) => Some(Category::Interpolated), + NodeKind::Markup { .. } => Some(Category::Interpolated), NodeKind::FuncCall => Some(Category::Function), NodeKind::MethodCall if i > 0 => Some(Category::Function), NodeKind::ClosureExpr if i == 0 => Some(Category::Function), @@ -298,8 +298,8 @@ impl Category { NodeKind::Error(_, _) => Some(Category::Invalid), NodeKind::Unknown(_) => Some(Category::Invalid), NodeKind::Underscore => None, - NodeKind::Markup(_) => None, - NodeKind::Space(_) => None, + NodeKind::Markup { .. } => None, + NodeKind::Space { .. } => None, NodeKind::Text(_) => None, NodeKind::Quote { .. } => None, NodeKind::List => None, |
