mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 16:47:47 +01:00
Ignore OEB header and footer blocks
This commit is contained in:
parent
3f581152cd
commit
6fb37e2422
1 changed files with 3 additions and 3 deletions
|
|
@ -171,8 +171,7 @@ def mobimlize_content(self, tag, text, bstate, istates):
|
|||
para = etree.SubElement(para, XHTML('blockquote'))
|
||||
emleft -= 1
|
||||
else:
|
||||
ptag = 'p' #tag if tag in HEADER_TAGS else 'p'
|
||||
para = wrapper = etree.SubElement(parent, XHTML(ptag))
|
||||
para = wrapper = etree.SubElement(parent, XHTML('p'))
|
||||
bstate.inline = bstate.para = para
|
||||
vspace = bstate.vpadding + bstate.vmargin
|
||||
bstate.vpadding = bstate.vmargin = 0
|
||||
|
|
@ -241,7 +240,8 @@ def mobimlize_elem(self, elem, stylizer, bstate, istates):
|
|||
or namespace(elem.tag) != XHTML_NS:
|
||||
return
|
||||
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':
|
||||
return
|
||||
tag = barename(elem.tag)
|
||||
|
|
|
|||
Loading…
Reference in a new issue