mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
ignore cloze hint when typing answer
This commit is contained in:
parent
8d60bcaf05
commit
9345397859
1 changed files with 6 additions and 1 deletions
|
@ -372,7 +372,12 @@ Please run Tools>Maintenance>Empty Cards""")
|
||||||
matches = re.findall("\{\{c%s::(.+?)\}\}"%idx, txt)
|
matches = re.findall("\{\{c%s::(.+?)\}\}"%idx, txt)
|
||||||
if not matches:
|
if not matches:
|
||||||
return None
|
return None
|
||||||
elif len(matches) > 1:
|
def noHint(txt):
|
||||||
|
if "::" in txt:
|
||||||
|
return txt.split("::")[0]
|
||||||
|
return txt
|
||||||
|
matches = [noHint(txt) for txt in matches]
|
||||||
|
if len(matches) > 1:
|
||||||
txt = ", ".join(matches)
|
txt = ", ".join(matches)
|
||||||
else:
|
else:
|
||||||
txt = matches[0]
|
txt = matches[0]
|
||||||
|
|
Loading…
Reference in a new issue