diff --git a/src/epub_converter/html_epub_preprocessor.py b/src/epub_converter/html_epub_preprocessor.py index e46e46d..87c98c9 100644 --- a/src/epub_converter/html_epub_preprocessor.py +++ b/src/epub_converter/html_epub_preprocessor.py @@ -276,7 +276,7 @@ def _preprocess_div_tags(chapter_tag): Function replace
with : """ for div in chapter_tag.find_all("div"): - if div.attrs.get('style'): + if any(attr in ['width', 'border', 'bgcolor'] for attr in div.attrs): _wrap_tag_with_table( chapter_tag, tag_to_be_wrapped=div,