Fix the non-setting of white backgrounds.

This commit is contained in:
ospalh 2012-10-26 12:26:57 +02:00
parent be722989f3
commit 1e97b61bb1

View file

@ -494,13 +494,8 @@ order by ordinal""", mid)):
t[k] = t[k].replace( t[k] = t[k].replace(
"{{Reading}}", "{{furigana:Reading}}") "{{Reading}}", "{{furigana:Reading}}")
# adjust css # adjust css
if t['bg'].lower() == "#ffffff":
# a bit more intuitive default
bg = "white"
else:
bg = t['bg']
css = "" css = ""
if t['bg'] != "white": if t['bg'] != "white" and t['bg'].lower() != "#ffffff":
css = "background-color: %s;" % t['bg'] css = "background-color: %s;" % t['bg']
if t['align']: if t['align']:
css += "text-align: %s" % ("left", "right")[t['align']-1] css += "text-align: %s" % ("left", "right")[t['align']-1]