mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Ignore OEB header and footer blocks
This commit is contained in:
parent
3f581152cd
commit
6fb37e2422
@ -171,8 +171,7 @@ class MobiMLizer(object):
|
|||||||
para = etree.SubElement(para, XHTML('blockquote'))
|
para = etree.SubElement(para, XHTML('blockquote'))
|
||||||
emleft -= 1
|
emleft -= 1
|
||||||
else:
|
else:
|
||||||
ptag = 'p' #tag if tag in HEADER_TAGS else 'p'
|
para = wrapper = etree.SubElement(parent, XHTML('p'))
|
||||||
para = wrapper = etree.SubElement(parent, XHTML(ptag))
|
|
||||||
bstate.inline = bstate.para = para
|
bstate.inline = bstate.para = para
|
||||||
vspace = bstate.vpadding + bstate.vmargin
|
vspace = bstate.vpadding + bstate.vmargin
|
||||||
bstate.vpadding = bstate.vmargin = 0
|
bstate.vpadding = bstate.vmargin = 0
|
||||||
@ -241,7 +240,8 @@ class MobiMLizer(object):
|
|||||||
or namespace(elem.tag) != XHTML_NS:
|
or namespace(elem.tag) != XHTML_NS:
|
||||||
return
|
return
|
||||||
style = stylizer.style(elem)
|
style = stylizer.style(elem)
|
||||||
if style['display'] == 'none' \
|
# <mbp:frame-set/> does not exist lalalala
|
||||||
|
if style['display'] in ('none', 'oeb-page-head', 'oeb-page-foot') \
|
||||||
or style['visibility'] == 'hidden':
|
or style['visibility'] == 'hidden':
|
||||||
return
|
return
|
||||||
tag = barename(elem.tag)
|
tag = barename(elem.tag)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user