epub converter: small fix

This commit is contained in:
shirshasa
2021-09-13 20:18:20 +03:00
parent 2de6aafdfb
commit 73fa84bf76

View File

@@ -383,10 +383,11 @@ def add_inline_style_to_html_soup(soup1: BeautifulSoup, css_text: str):
for i in livecarta_tmp_ids:
tag = soup1.find(attrs={'livecarta_id': i})
tag_with_style = soup2.find(attrs={'livecarta_id': i})
del tag.attrs['livecarta_id']
if tag_with_style.attrs.get('style'):
style_converter = TagStyleConverter(tag, tag_with_style)
style_converter.convert_initial_tag()
del tag.attrs['livecarta_id']
return soup1