summaryrefslogtreecommitdiff
path: root/src/ide
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-27 15:09:05 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-27 15:32:05 +0100
commit2e039cb052fcb768027053cbf02ce396f6d7a6be (patch)
treeb1a1c1da0440805b296e3204fa30cd9666322a0e /src/ide
parenta59b9fff93f708d5a35d2bf61c3b21efee71b7e9 (diff)
Fix math spacing bugs
Diffstat (limited to 'src/ide')
-rw-r--r--src/ide/highlight.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ide/highlight.rs b/src/ide/highlight.rs
index b1df94d1..9261d157 100644
--- a/src/ide/highlight.rs
+++ b/src/ide/highlight.rs
@@ -209,7 +209,12 @@ pub fn highlight(node: &LinkedNode) -> Option<Category> {
SyntaxKind::Unary => None,
SyntaxKind::Binary => None,
SyntaxKind::FieldAccess => match node.parent_kind() {
- Some(SyntaxKind::Markup | SyntaxKind::Math) => Some(Category::Interpolated),
+ Some(
+ SyntaxKind::Markup
+ | SyntaxKind::Math
+ | SyntaxKind::MathFrac
+ | SyntaxKind::MathScript,
+ ) => Some(Category::Interpolated),
Some(SyntaxKind::FieldAccess) => node.parent().and_then(highlight),
_ => None,
},