mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 19:33:41 +02: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
1 changed files with 1 additions and 0 deletions
|
|
@ -127,6 +127,7 @@ def __init__(self, tree, path, oeb, profile=PROFILES['PRS505'],
|
|||
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…
Reference in a new issue