aboutsummaryrefslogtreecommitdiff
path: root/code/src/syntax_highlight
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-25 18:29:22 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-25 18:29:22 +0200
commite3edf18503b3975ccec3b33c0cb9e7f0888bd031 (patch)
tree9b8d795bf5e0ff6e0f5cdd882cef07d495f73a72 /code/src/syntax_highlight
parenta80b5c677417cdbc17df3109ef9d12afe79973cc (diff)
downloadmetamuffin-blog-e3edf18503b3975ccec3b33c0cb9e7f0888bd031.tar
metamuffin-blog-e3edf18503b3975ccec3b33c0cb9e7f0888bd031.tar.bz2
metamuffin-blog-e3edf18503b3975ccec3b33c0cb9e7f0888bd031.tar.zst
extend parser
Diffstat (limited to 'code/src/syntax_highlight')
-rw-r--r--code/src/syntax_highlight/grammar.rs2
-rw-r--r--code/src/syntax_highlight/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/code/src/syntax_highlight/grammar.rs b/code/src/syntax_highlight/grammar.rs
index 18ba9e2..0878b33 100644
--- a/code/src/syntax_highlight/grammar.rs
+++ b/code/src/syntax_highlight/grammar.rs
@@ -5,7 +5,7 @@ pub fn grammar_for(syntax: &str) -> &'static [(&'static str, &'static [&'static
"keyword",
&[
"fn", "pub", "async", "return", "if", "else", "let", "for", "in", "while",
- "loop", "impl", "for", "trait", "struct", "enum",
+ "loop", "impl", "for", "trait", "struct", "enum", "dyn",
],
),
(
diff --git a/code/src/syntax_highlight/mod.rs b/code/src/syntax_highlight/mod.rs
index 46bf2a0..62a2536 100644
--- a/code/src/syntax_highlight/mod.rs
+++ b/code/src/syntax_highlight/mod.rs
@@ -1,7 +1,7 @@
pub mod grammar;
pub mod theme;
-use crate::{markdown::escape, syntax_highlight::theme::theme};
+use crate::{markdown::render::escape, syntax_highlight::theme::theme};
use grammar::grammar_for;
use synoptic::{Highlighter, Token};