Skip to content

Commit 02c9245

Browse files
authored
fix: add word boundary assertions for extracted keywords (#72)
1 parent 93c7875 commit 02c9245

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ lazy_static! {
3232
.iter()
3333
.cloned()
3434
.map(|(pat, l)| {
35-
let r = Regex::new(&format!("{}(\")?", pat))?;
35+
let r = Regex::new(&format!("\\b{}\\b\"?", pat))?;
3636
Ok((r, l))
3737
})
3838
.collect::<Result<_, Error>>()

0 commit comments

Comments
 (0)