mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -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 = {}
|
||||
for (k, v) in fact.items():
|
||||
fields["text:"+k] = v[1]
|
||||
fields[k] = '<span class="fm%s">%s</span>' % (
|
||||
hexifyID(v[0]), v[1])
|
||||
if v[1]:
|
||||
fields[k] = '<span class="fm%s">%s</span>' % (
|
||||
hexifyID(v[0]), v[1])
|
||||
else:
|
||||
fields[k] = u""
|
||||
fields['tags'] = canonifyTags(tags)
|
||||
fields['Tags'] = fields['tags']
|
||||
# render q & a
|
||||
|
|
|
|||
Loading…
Reference in a new issue