mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
don't require fields in cloze del model; remove extra brackets in cloze hints
This commit is contained in:
parent
60643b5b1f
commit
619a58216a
2 changed files with 2 additions and 1 deletions
|
|
@ -438,6 +438,7 @@ select id from notes where mid = ?)""" % " ".join(map),
|
|||
cloze += "{{c%d::foo}}" % n
|
||||
# record that we require a specific string for generation
|
||||
reqstrs.append("{{c%d::" % n)
|
||||
return 'all', [], reqstrs
|
||||
for f in flds:
|
||||
a.append(cloze if cloze else "1")
|
||||
b.append("")
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ class Template(object):
|
|||
# replace chosen cloze with type
|
||||
if type == "q":
|
||||
if m.group(2):
|
||||
txt = re.sub(reg%ord, "<span class=cloze>[...(\\3)]</span>", txt)
|
||||
txt = re.sub(reg%ord, "<span class=cloze>[...\\3]</span>", txt)
|
||||
else:
|
||||
txt = re.sub(reg%ord, "<span class=cloze>[...]</span>", txt)
|
||||
elif type == "a":
|
||||
|
|
|
|||
Loading…
Reference in a new issue