From cf13881d0847e55c23eb3a9f53b6613227f83347 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 12 Sep 2011 23:39:02 -0600 Subject: [PATCH] ... --- src/calibre/ebooks/mobi/writer2/serializer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/mobi/writer2/serializer.py b/src/calibre/ebooks/mobi/writer2/serializer.py index ed6df6698a..6bc597ccb4 100644 --- a/src/calibre/ebooks/mobi/writer2/serializer.py +++ b/src/calibre/ebooks/mobi/writer2/serializer.py @@ -160,7 +160,7 @@ class Serializer(object): buf.write(b'title="') self.serialize_text(ref.title, quot=True) buf.write(b'" ') - if ref.title == 'start': + if ref.title == 'start' or ref.type in ('start', 'other.start'): self._start_href = ref.href self.serialize_href(ref.href) # Space required or won't work, I kid you not @@ -348,8 +348,9 @@ class Serializer(object): ''' buf = self.buf id_offsets = self.id_offsets + start_href = getattr(self, '_start_href', None) for href, hoffs in self.href_offsets.items(): - is_start = (href and href == getattr(self, '_start_href', None)) + is_start = (href and href == start_href) # Iterate over all filepos items if href not in id_offsets: self.logger.warn('Hyperlink target %r not found' % href)