forked from LiveCarta/BookConverter
Add parameters to html&css merge
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user