mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
Merge pull request #750 from sobjornstad/unaddable-tag
Fix unanchored regex in bulk tag add routine
This commit is contained in:
commit
f7928fe14f
2 changed files with 2 additions and 1 deletions
|
@ -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 a new issue