Merge pull request #750 from sobjornstad/unaddable-tag
Fix unanchored regex in bulk tag add routine
This commit is contained in:
commit
f7928fe14f
@ -47,6 +47,7 @@ Alexander Presnyakov <flagist0@gmail.com>
|
||||
abdo <github.com/ANH25>
|
||||
aplaice <plaice.adam+github@gmail.com>
|
||||
phwoo <github.com/phwoo>
|
||||
Soren Bjornstad <anki@sorenbjornstad.com>
|
||||
|
||||
********************
|
||||
|
||||
|
@ -152,7 +152,7 @@ impl Collection {
|
||||
let matcher = regex::RegexSet::new(
|
||||
tags.iter()
|
||||
.map(|s| regex::escape(s))
|
||||
.map(|s| format!("(?i){}", s)),
|
||||
.map(|s| format!("(?i)^{}$", s)),
|
||||
)
|
||||
.map_err(|_| AnkiError::invalid_input("invalid regex"))?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user