mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
keep typeAns as a field name
We have the fact loaded into memory anyway for the q/a display
This commit is contained in:
parent
7a5cee1d20
commit
4a601416bc
1 changed files with 0 additions and 10 deletions
|
@ -397,16 +397,6 @@ order by ordinal""", mid)):
|
||||||
# q fields now in a
|
# q fields now in a
|
||||||
if not hideq:
|
if not hideq:
|
||||||
conf['afmt'] = conf['qfmt'] + "\n\n<hr>\n\n" + conf['afmt']
|
conf['afmt'] = conf['qfmt'] + "\n\n<hr>\n\n" + conf['afmt']
|
||||||
# convert the field name to an ordinal
|
|
||||||
ordN = None
|
|
||||||
for (ord, fm) in enumerate(flds):
|
|
||||||
if fm['name'] == conf['typeAns']:
|
|
||||||
ordN = ord
|
|
||||||
break
|
|
||||||
if ordN is not None:
|
|
||||||
conf['typeAns'] = ordN
|
|
||||||
else:
|
|
||||||
conf['typeAns'] = None
|
|
||||||
for type in ("qfmt", "afmt"):
|
for type in ("qfmt", "afmt"):
|
||||||
# ensure the new style field format
|
# ensure the new style field format
|
||||||
conf[type] = re.sub("%\((.+?)\)s", "{{\\1}}", conf[type])
|
conf[type] = re.sub("%\((.+?)\)s", "{{\\1}}", conf[type])
|
||||||
|
|
Loading…
Reference in a new issue