From e10c6ce3cd71dd36960347af187eea92bf8b0850 Mon Sep 17 00:00:00 2001 From: Kiryl Date: Mon, 13 Jun 2022 13:26:13 +0300 Subject: [PATCH] Add to livecarta_config --- src/epub_converter/epub_converter.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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: