Only replace path params when starting with :

Fixes #99
This commit is contained in:
Gregory Schier
2024-09-19 06:07:19 -07:00
parent 7e056aa93a
commit 1d9a001036

View File

@@ -498,6 +498,10 @@ fn replace_path_placeholder(p: &HttpUrlParameter, url: &str) -> String {
if !p.enabled {
return url.to_string();
}
if !p.name.starts_with(":") {
return url.to_string();
}
let re = regex::Regex::new(format!("(/){}([/?#]|$)", p.name).as_str()).unwrap();
let result = re