From 59076294063f712e7bc0f8611af1a971453aafaa Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 7 Oct 2018 18:21:51 +1000 Subject: [PATCH] fix bug in tag deletion https://anki.tenderapp.com/discussions/ankidesktop/30146-removing-single-letter-tags-also-removes-any-other-tags-with-the-letter --- anki/tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/tags.py b/anki/tags.py index 79803a32b..c782120ec 100644 --- a/anki/tags.py +++ b/anki/tags.py @@ -143,7 +143,7 @@ class TagManager: "Delete tags if they exist." def wildcard(pat, str): pat = re.escape(pat).replace('\\*', '.*') - return re.search(pat, str, re.IGNORECASE) + return re.match("^"+pat+"$", str, re.IGNORECASE) currentTags = self.split(tags) for tag in self.split(deltags): # find tags, ignoring case