Skip to content

Commit

Permalink
Fix sig function body extraction not escaping $
Browse files Browse the repository at this point in the history
  • Loading branch information
MMaster committed Aug 7, 2024
1 parent 2db19fb commit 6f7054a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6f7054a

Please sign in to comment.