diff --git a/src/epub_converter/epub_converter.py b/src/epub_converter/epub_converter.py index 2d286c6..dc8d3a2 100644 --- a/src/epub_converter/epub_converter.py +++ b/src/epub_converter/epub_converter.py @@ -139,9 +139,7 @@ class EpubConverter: """This function is designed to convert inline html styles""" for html_href in self.html_href2html_body_soup: html_content: BeautifulSoup = self.html_href2html_body_soup[html_href] - could_have_style_in_livecarta_regexp = re.compile( - '(^div$)|(^p$)|(^span$)|(^code$)|(^kbd$)|(^var$)|(^li$)|(^ul$)|(^ol$)|(^td$)|(^th$)|(^h[1-9]$)') - tags_with_inline_style = html_content.find_all(could_have_style_in_livecarta_regexp, + tags_with_inline_style = html_content.find_all(LiveCartaConfig.could_have_style_in_livecarta_regexp, attrs={'style': re.compile('.*')}) for tag_initial_inline_style in tags_with_inline_style: