From 492226f56aad6a0bb4d788c644e95cb3e5df6b16 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 24 Oct 2024 01:19:30 +0200 Subject: [PATCH] fix: dont break when multiple vars --- src/ext.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ext.rs b/src/ext.rs index b0133a2..dca3c80 100644 --- a/src/ext.rs +++ b/src/ext.rs @@ -40,7 +40,7 @@ pub fn stringify_json(v: &serde_json::Value) -> String { pub fn var_matcher() -> &'static regex::Regex { static MATCHER : OnceLock = 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