diff --git a/anki/models.py b/anki/models.py index 84e5a9b09..07ffe571f 100644 --- a/anki/models.py +++ b/anki/models.py @@ -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("") diff --git a/anki/template/template.py b/anki/template/template.py index ddead788c..c4640f4a7 100644 --- a/anki/template/template.py +++ b/anki/template/template.py @@ -180,7 +180,7 @@ class Template(object): # replace chosen cloze with type if type == "q": if m.group(2): - txt = re.sub(reg%ord, "[...(\\3)]", txt) + txt = re.sub(reg%ord, "[...\\3]", txt) else: txt = re.sub(reg%ord, "[...]", txt) elif type == "a":