forked from LiveCarta/BookConverter
epub converter: small fix
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user