aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-08-30 17:31:36 +0200
committermetamuffin <metamuffin@disroot.org>2022-08-30 17:31:36 +0200
commit50485b9ade676899146d58ecf89e0407b22564f4 (patch)
tree3f3441fc11c85498a7ed2abb4b7700746d8078aa
parent5598051d92377dcfc776620aad10eec854a40663 (diff)
downloadmetamuffin-blog-50485b9ade676899146d58ecf89e0407b22564f4.tar
metamuffin-blog-50485b9ade676899146d58ecf89e0407b22564f4.tar.bz2
metamuffin-blog-50485b9ade676899146d58ecf89e0407b22564f4.tar.zst
dont crash if grammar missing
-rw-r--r--code/src/syntax_highlight/grammar.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/code/src/syntax_highlight/grammar.rs b/code/src/syntax_highlight/grammar.rs
index 9e6caae..ba703e7 100644
--- a/code/src/syntax_highlight/grammar.rs
+++ b/code/src/syntax_highlight/grammar.rs
@@ -34,6 +34,6 @@ pub fn grammar_for(syntax: &str) -> &'static [(&'static [&'static str], &'static
(&["([a-z_][A-Za-z0-9_]*)\\s*\\("], "identifier"),
(&["\".*?\"", "\\d", "true", "false"], "literal"),
],
- _ => unreachable!(),
+ _ => &[],
}
}