mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Ignore ascii case when filtering system tags
This commit is contained in:
parent
fbc21da913
commit
4aa5ee5fb4
1 changed files with 2 additions and 2 deletions
|
@ -73,11 +73,11 @@ impl ExchangeData {
|
|||
}
|
||||
|
||||
fn remove_system_tags(&mut self) {
|
||||
// TODO: case folding? child tags?
|
||||
const SYSTEM_TAGS: [&str; 2] = ["marked", "leech"];
|
||||
for note in self.notes.iter_mut() {
|
||||
note.tags = std::mem::take(&mut note.tags)
|
||||
.into_iter()
|
||||
.filter(|tag| !matches!(tag.as_str(), "marked" | "leech"))
|
||||
.filter(|tag| !SYSTEM_TAGS.iter().any(|s| tag.eq_ignore_ascii_case(s)))
|
||||
.collect();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue