From 12fa2cb1ebfad105d379eb2742f9915b55a4bee8 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:30:47 +0800 Subject: [PATCH] `-` is not a legal character in variable name --- build/syntax_mapping.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/syntax_mapping.rs b/build/syntax_mapping.rs index c8882301..125efd25 100644 --- a/build/syntax_mapping.rs +++ b/build/syntax_mapping.rs @@ -65,7 +65,7 @@ impl FromStr for Matcher { type Err = anyhow::Error; fn from_str(s: &str) -> Result { use MatcherSegment as Seg; - static VAR_REGEX: Lazy = Lazy::new(|| Regex::new(r"\$\{([\w\d_\-]+)\}").unwrap()); + static VAR_REGEX: Lazy = Lazy::new(|| Regex::new(r"\$\{([\w\d_]+)\}").unwrap()); let mut segments = vec![]; let mut text_start = 0;