mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
preserve font-style/font-weight
fixes https://anki.lighthouseapp.com/projects/100923-ankidesktop/tickets/333-html-being-changed-after-the-card-is-created
This commit is contained in:
parent
011cbde3b9
commit
243c2b11ed
1 changed files with 2 additions and 0 deletions
|
@ -275,6 +275,8 @@ def _filterHTML(html):
|
|||
continue
|
||||
if k.strip() == "color" and not v.strip() == "rgb(0, 0, 0)":
|
||||
preserve += "color:%s;" % v
|
||||
if k.strip() in ("font-weight", "font-style"):
|
||||
preserve += item + ";"
|
||||
if preserve:
|
||||
# preserve colour attribute, delete implicit class
|
||||
tag.attrs = ((u"style", preserve),)
|
||||
|
|
Loading…
Reference in a new issue