mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
1249a15570
commit
3697256c45
@ -307,8 +307,8 @@ class Serializer(object):
|
||||
href = '#'.join((item.href, id_))
|
||||
offset = self.anchor_offset or buf.tell()
|
||||
key = urlnormalize(href)
|
||||
if key not in self.id_offsets:
|
||||
self.id_offsets[urlnormalize(href)] = offset
|
||||
# Only set this id_offset if it wasn't previously seen
|
||||
self.id_offsets[key] = self.id_offsets.get(key, offset)
|
||||
if self.anchor_offset is not None and \
|
||||
tag == 'a' and not elem.attrib and \
|
||||
not len(elem) and not elem.text:
|
||||
|
Loading…
x
Reference in New Issue
Block a user