mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Fix bug in anchor insertion routine where it was inserting an anchor in the wrong place
This commit is contained in:
parent
0140831b53
commit
54dd263be1
@ -587,7 +587,8 @@ class MobiReader(object):
|
|||||||
if r > -1 and (r < l or l == end or l == -1):
|
if r > -1 and (r < l or l == end or l == -1):
|
||||||
p = self.mobi_html.rfind('<', 0, end + 1)
|
p = self.mobi_html.rfind('<', 0, end + 1)
|
||||||
if pos < end and p > -1 and \
|
if pos < end and p > -1 and \
|
||||||
not end_tag_re.match(self.mobi_html[p:r]):
|
not end_tag_re.match(self.mobi_html[p:r]) and \
|
||||||
|
not self.mobi_html[p:r+1].endswith('/>'):
|
||||||
anchor = ' filepos-id="filepos%d"'
|
anchor = ' filepos-id="filepos%d"'
|
||||||
end = r
|
end = r
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user