epub converter: small fix

This commit is contained in:
shirshasa
2021-07-02 15:38:36 +03:00
parent 3a7b6ab7ff
commit b683c2127a
2 changed files with 1 additions and 2 deletions

View File

@@ -206,7 +206,6 @@ def add_inline_style_to_html_soup(soup1, css_text):
tag_will_be_saved = parent_tag.name in tag_with_bg
has_bg = parent_tag.attrs.get('style') and ('background' in parent_tag.attrs.get('style'))
if has_bg and tag_will_be_saved:
print(tag, parent_tag.attrs.get('style'), parent_tag.name)
return style_
children = tag.find_all()

View File

@@ -87,7 +87,7 @@ def rgba2rgb(r, g, b, alpha):
def str2hex(s: str):
if '#' in s:
if '#' in s and (len(s) <= 7):
return s.lower()
if ('rgb' in s) and ('%' in s):