Skip to content

Commit

Permalink
correctly capture variables, which can contain underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
hry-gh committed Nov 15, 2024
1 parent 632fbc5 commit 69e9682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/od_ref_bot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ fn format_body(body: &str, data: &Data) -> String {
let mut replaced_body = body.to_string();

let link_finder_regex =
Regex::new(r##"\{\{ *?([a-zA-Z_]*)\(((var|proc)="([a-zA-Z]*?)")? ?\).*?\}\}"##).unwrap();
Regex::new(r##"\{\{ *?([a-zA-Z_]*)\(((var|proc)="([a-zA-Z_]*?)")? ?\).*?\}\}"##).unwrap();

for capture in link_finder_regex.captures_iter(body) {
let original = capture.get(0).unwrap().as_str();
Expand Down

0 comments on commit 69e9682

Please sign in to comment.