diff --git a/Cargo.lock b/Cargo.lock index 03dfc0e..09a2778 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1511,7 +1511,7 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tron" -version = "0.2.4" +version = "0.2.5" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index a9fef1a..f393b12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tron" -version = "0.2.4" +version = "0.2.5" authors = ["Christine Dodrill "] edition = "2018" repository = "https://tulpa.dev/cadey/tron" diff --git a/src/main.rs b/src/main.rs index 9ed5d46..314ea93 100644 --- a/src/main.rs +++ b/src/main.rs @@ -232,7 +232,7 @@ async fn main() -> Result<()> { log::debug!("{} -> {}", rule.regex, rule.why); compiled_rules.push(CompiledRule { raw: rule.regex.clone(), - regex: Regex::new(rule.regex.as_str())?, + regex: Regex::new(&format!("\\b{}\\b", rule.regex))?, why: rule.why, }) }