diff --git a/src/inline_style_processor.py b/src/inline_style_processor.py index 4b9ecbd..08b2f08 100644 --- a/src/inline_style_processor.py +++ b/src/inline_style_processor.py @@ -258,12 +258,15 @@ def modify_html_soup_with_css_styles(html_soup: BeautifulSoup, css_text: str = " css_text = css_text.replace( '@namespace epub "http://www.idpf.org/2007/ops";', '') # here we add css styles to inline style - html_with_css_styles: str = transform(str(html_soup), css_text=css_text, + html_with_css_styles: str = transform(str(html_soup), + exclude_pseudoclasses=False, + include_star_selectors=True, remove_classes=False, external_styles=False, - allow_network=False, + css_text=css_text, disable_validation=True, - ) + allow_network=False) + # soup with converted styles from css inline_soup = BeautifulSoup(html_with_css_styles, features="lxml") diff --git a/src/livecarta_config.py b/src/livecarta_config.py index d62f8c9..51e8679 100644 --- a/src/livecarta_config.py +++ b/src/livecarta_config.py @@ -58,7 +58,7 @@ class LiveCartaConfig: "text-decoration": ["underline", "line-through"], # , "text-decoration-line": ["underline", "line-through"], # , "text-transform": [], - "text-align": [x for x in ["justify", "right", "center", "left"] if x != "left"], + "text-align": ["justify", "right", "center"], "text-indent": [], "margin": [], "margin-top": [],