forked from LiveCarta/BookConverter
epub converter: small fix
This commit is contained in:
@@ -383,10 +383,11 @@ def add_inline_style_to_html_soup(soup1: BeautifulSoup, css_text: str):
|
|||||||
for i in livecarta_tmp_ids:
|
for i in livecarta_tmp_ids:
|
||||||
tag = soup1.find(attrs={'livecarta_id': i})
|
tag = soup1.find(attrs={'livecarta_id': i})
|
||||||
tag_with_style = soup2.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'):
|
if tag_with_style.attrs.get('style'):
|
||||||
style_converter = TagStyleConverter(tag, tag_with_style)
|
style_converter = TagStyleConverter(tag, tag_with_style)
|
||||||
style_converter.convert_initial_tag()
|
style_converter.convert_initial_tag()
|
||||||
del tag.attrs['livecarta_id']
|
|
||||||
return soup1
|
return soup1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user