mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 15:17:12 -05:00
only collapse cloze in type answer if single unique phrase
This commit is contained in:
parent
9f6b073def
commit
7dc26ed31d
1 changed files with 4 additions and 10 deletions
|
|
@ -434,17 +434,11 @@ Please run Tools>Empty Cards""")
|
||||||
return txt.split("::")[0]
|
return txt.split("::")[0]
|
||||||
return txt
|
return txt
|
||||||
matches = [noHint(txt) for txt in matches]
|
matches = [noHint(txt) for txt in matches]
|
||||||
if len(matches) > 1:
|
uniqMatches = set(matches)
|
||||||
arr = []
|
if len(uniqMatches) == 1:
|
||||||
seen = {}
|
|
||||||
for m in matches:
|
|
||||||
if m in seen:
|
|
||||||
continue
|
|
||||||
seen[m] = 1
|
|
||||||
arr.append(m)
|
|
||||||
txt = ", ".join(arr)
|
|
||||||
else:
|
|
||||||
txt = matches[0]
|
txt = matches[0]
|
||||||
|
else:
|
||||||
|
txt = ", ".join(matches)
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
def tokenizeComparison(self, given, correct):
|
def tokenizeComparison(self, given, correct):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue