mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-05 08:40:13 -04:00
Fix #788570 (Calibre Epub to Mobi does not handle hidden spans correctly)
This commit is contained in:
parent
ea0920053f
commit
5744242319
@ -297,9 +297,11 @@ class MobiMLizer(object):
|
||||
if id_:
|
||||
# Keep anchors so people can use display:none
|
||||
# to generate hidden TOCs
|
||||
tail = elem.tail
|
||||
elem.clear()
|
||||
elem.text = None
|
||||
elem.set('id', id_)
|
||||
elem.tail = tail
|
||||
else:
|
||||
return
|
||||
tag = barename(elem.tag)
|
||||
@ -309,7 +311,8 @@ class MobiMLizer(object):
|
||||
istates.append(istate)
|
||||
left = 0
|
||||
display = style['display']
|
||||
isblock = not display.startswith('inline')
|
||||
isblock = (not display.startswith('inline') and style['display'] !=
|
||||
'none')
|
||||
isblock = isblock and style['float'] == 'none'
|
||||
isblock = isblock and tag != 'br'
|
||||
if isblock:
|
||||
|
Loading…
x
Reference in New Issue
Block a user