mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
don't allow tags to be prefixed with a colon, as this breaks sqlite
This commit is contained in:
parent
3aa787a146
commit
84b99b1ae5
1 changed files with 2 additions and 1 deletions
|
@ -237,7 +237,8 @@ def joinTags(tags):
|
|||
|
||||
def canonifyTags(tags):
|
||||
"Strip leading/trailing/superfluous commas and duplicates."
|
||||
return joinTags(sorted(set(parseTags(tags))))
|
||||
tags = [t.lstrip(":") for t in set(parseTags(tags))]
|
||||
return joinTags(sorted(tags))
|
||||
|
||||
def findTag(tag, tags):
|
||||
"True if TAG is in TAGS. Ignore case."
|
||||
|
|
Loading…
Reference in a new issue