experiment with displaying FrontSide under answer

- avoids having to move eyes to answer section
- the fade out/fade in step feels more natural when the
question section moves

feedback welcome
This commit is contained in:
Damien Elmes 2017-08-07 18:38:35 +10:00
parent dc81af96ac
commit a1b0ddb00c

View File

@ -529,6 +529,9 @@ where c.nid = n.id and c.id in %s group by nid""" % ids2str(cids)):
format = re.sub("{{(.*?)cloze:", r"{{\1ca-%d:" % (data[4]+1), format)
format = format.replace("<%cloze:", "<%%ca:%d:" % (
data[4]+1))
format = re.sub(r"^{{FrontSide}}\s*?<hr id=answer>(.*)$",
"\\1<hr>{{FrontSide}}",
format, flags=re.DOTALL)
fields['FrontSide'] = stripSounds(d['q'])
fields = runFilter("mungeFields", fields, model, data, self)
html = anki.template.render(format, fields)