mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix regression in 0.8.18 that broke viewing/converting of some MOBI files. Fixes #846216 (Could not open ebook)
This commit is contained in:
parent
9e54a069bb
commit
cce0b15293
@ -654,8 +654,9 @@ class MobiReader(object):
|
||||
pass
|
||||
if (tag.tag == 'a' and attrib.get('id', '').startswith('filepos')
|
||||
and not tag.text and (tag.tail is None or not
|
||||
tag.tail.strip()) and tag.getnext().tag in ('h1', 'h2',
|
||||
'h3', 'h4', 'h5', 'h6', 'div', 'p')):
|
||||
tag.tail.strip()) and getattr(tag.getnext(), 'tag',
|
||||
None) in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6',
|
||||
'div', 'p')):
|
||||
# This is an empty anchor immediately before a block tag, move
|
||||
# the id onto the block tag instead
|
||||
forwardable_anchors.append(tag)
|
||||
|
Loading…
x
Reference in New Issue
Block a user