Remove div from skip with lc_tmp

This commit is contained in:
Kibzik
2023-04-17 19:29:06 +03:00
parent 40dd48ec52
commit 11bca250ab

View File

@@ -280,7 +280,7 @@ class EpubConverter:
for i in self.html_href2subchapters_ids[html_href]:
tag = soup.find(id=i)
# in order not to lose tags in verification of same level of chapter
parent_tag = tag.find_parents(['p', 'span', 'div', 'h1', 'h2', 'h3', 'h4', 'h5'])[-1]
parent_tag = tag.find_parents(['p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5'])[-1]
tmp_tag = soup.new_tag("lc_tmp")
tmp_tag.attrs["class"] = "converter-chapter-mark"
tmp_tag.attrs["id"] = i