From 5a71cd84a3c639834ce03ec2401aa7fd046808b9 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 24 Oct 2010 12:50:20 +0900 Subject: [PATCH] remove underline hack, more robust bold hack for osx --- ankiqt/ui/utils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ankiqt/ui/utils.py b/ankiqt/ui/utils.py index a6cdebfc7..4d9e4028f 100644 --- a/ankiqt/ui/utils.py +++ b/ankiqt/ui/utils.py @@ -239,11 +239,8 @@ def restoreHeader(widget, key): def mungeQA(deck, txt): txt = renderLatex(deck, txt) txt = stripSounds(txt) - # webkit currently doesn't handle bold/underline properly - txt = txt.replace("font-weight: 600;", - "font-weight: 900;") - txt = txt.replace("text-decoration: underline;", - "border-bottom: 1px solid #000;") + # osx webkit doesn't understand font weight 600 + txt = re.sub("font-weight:.+?;", "font-weight: bold", txt) return txt def applyStyles(widget):