mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
preserve order in multi cloze type answer; bump version
This commit is contained in:
parent
e963576e21
commit
3b20de173f
2 changed files with 9 additions and 2 deletions
|
@ -30,6 +30,6 @@ if arch[1] == "ELF":
|
|||
sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % (
|
||||
sys.version_info[1], arch[0][0:2])))
|
||||
|
||||
version="2.0.21" # build scripts grep this line, so preserve formatting
|
||||
version="2.0.22" # build scripts grep this line, so preserve formatting
|
||||
from anki.storage import Collection
|
||||
__all__ = ["Collection"]
|
||||
|
|
|
@ -434,7 +434,14 @@ Please run Tools>Empty Cards""")
|
|||
return txt
|
||||
matches = [noHint(txt) for txt in matches]
|
||||
if len(matches) > 1:
|
||||
txt = ", ".join(list(set(matches)))
|
||||
arr = []
|
||||
seen = {}
|
||||
for m in matches:
|
||||
if m in seen:
|
||||
continue
|
||||
seen[m] = 1
|
||||
arr.append(m)
|
||||
txt = ", ".join(arr)
|
||||
else:
|
||||
txt = matches[0]
|
||||
return txt
|
||||
|
|
Loading…
Reference in a new issue