forked from LiveCarta/BookConverter
epub converter: fix adding nested style tags
This commit is contained in:
@@ -255,11 +255,12 @@ class TagStyleConverter:
|
|||||||
|
|
||||||
if new_tags:
|
if new_tags:
|
||||||
tmp_attrs = top_tag.attrs.copy()
|
tmp_attrs = top_tag.attrs.copy()
|
||||||
top_tag = BeautifulSoup(features='lxml').new_tag(self.tag_initial_name)
|
top_tag.attrs = {}
|
||||||
top_tag.attrs = tmp_attrs
|
top_tag2 = BeautifulSoup(features='lxml').new_tag(self.tag_initial_name)
|
||||||
|
top_tag2.attrs = tmp_attrs
|
||||||
if self.style:
|
if self.style:
|
||||||
top_tag.attrs['style'] = self.style
|
top_tag2.attrs['style'] = self.style
|
||||||
new_tags[-1].wrap(top_tag)
|
new_tags[-1].wrap(top_tag2)
|
||||||
else:
|
else:
|
||||||
top_tag.attrs['style'] = self.style
|
top_tag.attrs['style'] = self.style
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user