diff --git a/aqt/editor.py b/aqt/editor.py index 65ca39e98..d3cfaf114 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -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),)