mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion pipeline: Fix bug that was causing @page rules in CSS embedded in <style> tags to not be stripped. This fixes the problem of EPUB files converted from the HTML output of Microsoft Word having large margins.
This commit is contained in:
parent
5fd1812579
commit
07b1efef27
@ -127,6 +127,7 @@ class Stylizer(object):
|
||||
if elem.tag == XHTML('style') and elem.text \
|
||||
and elem.get('type', CSS_MIME) in OEB_STYLES:
|
||||
text = XHTML_CSS_NAMESPACE + elem.text
|
||||
text = oeb.css_preprocessor(text)
|
||||
stylesheet = parser.parseString(text, href=cssname)
|
||||
stylesheet.namespaces['h'] = XHTML_NS
|
||||
stylesheets.append(stylesheet)
|
||||
|
Loading…
x
Reference in New Issue
Block a user