mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
make the cloze hint a prefix
This commit is contained in:
parent
d60a3f8e25
commit
66534db987
2 changed files with 2 additions and 2 deletions
|
@ -200,7 +200,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":
|
||||
|
|
|
@ -132,7 +132,7 @@ def test_cloze():
|
|||
f = d.newNote()
|
||||
f['Text'] = "hello {{c1::world::typical}}"
|
||||
assert d.addNote(f) == 1
|
||||
assert "<span class=cloze>[...typical]</span>" in f.cards()[0].q()
|
||||
assert "<span class=cloze>[typical...]</span>" in f.cards()[0].q()
|
||||
assert "<span class=cloze>world</span>" in f.cards()[0].a()
|
||||
# and with 2 clozes
|
||||
f = d.newNote()
|
||||
|
|
Loading…
Reference in a new issue