epub converter: update config.py

This commit is contained in:
shirshasa
2021-04-23 14:28:28 +03:00
parent 37e47d0aa7
commit d5dc3529b7
2 changed files with 22 additions and 3 deletions

View File

@@ -91,10 +91,10 @@ class HTMLPreprocessor:
if style:
style = self.convert_font_pt_to_px(style)
if style != "":
if color and color in LawCartaConfig.COLORS:
if color and color in LawCartaConfig.COLORS_MAP:
style += f'; color: {color};'
font.attrs["style"] = style
elif color and color in LawCartaConfig.COLORS:
elif color and color in LawCartaConfig.COLORS_MAP:
font.attrs["style"] = f'color: {color};'
if face is not None: