epub converter: tmp color fix

This commit is contained in:
shirshasa
2021-05-28 19:49:59 +03:00
parent a077b26c83
commit 684738e8a9

View File

@@ -222,6 +222,10 @@ def add_inline_style_to_html_soup(soup1, css_text):
tag.attrs['style'] = style tag.attrs['style'] = style
del tag.attrs['livecarta_id'] del tag.attrs['livecarta_id']
if(tag.name == 'p') and ('background-color' in tag.attrs.get('style')):
tag.name = 'span'
print(tag)
else: else:
del tag.attrs['livecarta_id'] del tag.attrs['livecarta_id']
return soup1 return soup1