mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
clear_tag() should be case-insensitive
This commit is contained in:
parent
dbd0334f97
commit
0ac97cf358
2 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ impl SqliteStorage {
|
|||
pub(crate) fn clear_tag(&self, tag: &str) -> Result<()> {
|
||||
self.db
|
||||
.prepare_cached("delete from tags where tag regexp ?")?
|
||||
.execute(&[format!("^{}($|::)", regex::escape(tag))])?;
|
||||
.execute(&[format!("(?i)^{}($|::)", regex::escape(tag))])?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -435,7 +435,7 @@ mod test {
|
|||
|
||||
// tag children are also cleared when clearing their parent
|
||||
col.storage.clear_tags()?;
|
||||
for name in vec!["a", "a::b", "a::b::c"] {
|
||||
for name in vec!["a", "a::b", "A::b::c"] {
|
||||
col.register_tag(Tag::new(name.to_string(), Usn(0)))?;
|
||||
}
|
||||
col.storage.clear_tag("a")?;
|
||||
|
|
Loading…
Reference in a new issue