mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 20:57:13 -05:00
no need to wrap empty fields
This commit is contained in:
parent
cd383174c6
commit
ddcdda72c9
1 changed files with 5 additions and 2 deletions
|
|
@ -116,8 +116,11 @@ def formatQA(cid, mid, fact, tags, cm):
|
||||||
fields = {}
|
fields = {}
|
||||||
for (k, v) in fact.items():
|
for (k, v) in fact.items():
|
||||||
fields["text:"+k] = v[1]
|
fields["text:"+k] = v[1]
|
||||||
|
if v[1]:
|
||||||
fields[k] = '<span class="fm%s">%s</span>' % (
|
fields[k] = '<span class="fm%s">%s</span>' % (
|
||||||
hexifyID(v[0]), v[1])
|
hexifyID(v[0]), v[1])
|
||||||
|
else:
|
||||||
|
fields[k] = u""
|
||||||
fields['tags'] = canonifyTags(tags)
|
fields['tags'] = canonifyTags(tags)
|
||||||
fields['Tags'] = fields['tags']
|
fields['Tags'] = fields['tags']
|
||||||
# render q & a
|
# render q & a
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue