mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 03:23:47 +02: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
1 changed files with 2 additions and 1 deletions
|
|
@ -587,7 +587,8 @@ def add_anchors(self):
|
|||
if r > -1 and (r < l or l == end or l == -1):
|
||||
p = self.mobi_html.rfind('<', 0, end + 1)
|
||||
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"'
|
||||
end = r
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue