Fix sig function body extraction not escaping $

This commit is contained in:
MMaster 2024-08-08 01:36:07 +02:00
parent 2db19fb81f
commit 6f7054a457

View File

@ -152,7 +152,7 @@ pub async fn fetch_update(state: Arc<GlobalState>) -> Result<(), FetchUpdateStat
.as_str();
let mut sig_function_body_regex_str: String = String::new();
sig_function_body_regex_str += sig_function_name;
sig_function_body_regex_str += &sig_function_name.replace("$", "\\$");
sig_function_body_regex_str += "=function\\([a-zA-Z0-9_]+\\)\\{.+?\\}";
let sig_function_body_regex = Regex::new(&sig_function_body_regex_str).unwrap();