don't allow tags to be prefixed with a colon, as this breaks sqlite

This commit is contained in:
Damien Elmes 2010-11-26 03:49:01 +09:00
parent 3aa787a146
commit 84b99b1ae5

View file

@ -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."