From bd4aa1d7091ac004d99a7557084f8415f2b0edba Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 30 Aug 2022 20:09:20 +0200 Subject: fix makefile grammar --- .gitignore | 2 ++ code/src/syntax_highlight/grammar.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b80cd42 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/code/target +/content/out diff --git a/code/src/syntax_highlight/grammar.rs b/code/src/syntax_highlight/grammar.rs index aa4008a..82ae243 100644 --- a/code/src/syntax_highlight/grammar.rs +++ b/code/src/syntax_highlight/grammar.rs @@ -38,7 +38,7 @@ pub fn grammar_for(syntax: &str) -> &'static [(&'static str, &'static [&'static // makefile doesnt really match the token-kinds, i'll just use something that looks goo "makefile" => &[ ("comment", &["(?m)(#.*)$"]), - ("literal", &[".+:"]), + ("literal", &[".+: "]), ("macro", &["\\$\\(\\w+\\)"]), ("type", &["\\$@", "\\$<"]), ], -- cgit v1.2.3-70-g09d2