fix: dont break when multiple vars
This commit is contained in:
parent
40f2c0a6d4
commit
492226f56a
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ pub fn stringify_json(v: &serde_json::Value) -> String {
|
||||||
|
|
||||||
pub fn var_matcher() -> &'static regex::Regex {
|
pub fn var_matcher() -> &'static regex::Regex {
|
||||||
static MATCHER : OnceLock<regex::Regex> = OnceLock::new();
|
static MATCHER : OnceLock<regex::Regex> = OnceLock::new();
|
||||||
MATCHER.get_or_init(|| regex::Regex::new(r"\$\{(.*)\}").expect("wrong matcher regex"))
|
MATCHER.get_or_init(|| regex::Regex::new(r"\$\{(\w+)\}").expect("wrong matcher regex"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep it as separate fn so we can change it everywhere easily
|
// keep it as separate fn so we can change it everywhere easily
|
||||||
|
|
Loading…
Reference in a new issue