mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Input: Fix incorrect conversion of MOBI files that wrap their content inside <a> anchor tags. Fixes #1405858 [A mobi file will not display or convert properly](https://bugs.launchpad.net/calibre/+bug/1405858)
This commit is contained in:
parent
8ec51ecae3
commit
b055c70cb5
@ -525,7 +525,7 @@ class MobiReader(object):
|
||||
except ValueError:
|
||||
pass
|
||||
if (tag.tag == 'a' and attrib.get('id', '').startswith('filepos')
|
||||
and not tag.text and (tag.tail is None or not
|
||||
and not tag.text and len(tag) == 0 and (tag.tail is None or not
|
||||
tag.tail.strip()) and getattr(tag.getnext(), 'tag',
|
||||
None) in BLOCK_TAGS):
|
||||
# This is an empty anchor immediately before a block tag, move
|
||||
|
Loading…
x
Reference in New Issue
Block a user