mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-30 15:43:17 +02:00
MOBI Output: Fix ToC at start option having no effect when converting some input documents that have an out-of-spine ToC. Fixes #1033656 (Table of Contents not in Front after converting)
This commit is contained in:
parent
f0b673610a
commit
08f38df9b9
1 changed files with 4 additions and 1 deletions
|
|
@ -73,7 +73,10 @@ def __call__(self, oeb, context):
|
|||
if (hasattr(item.data, 'xpath') and
|
||||
XPath('//h:a[@href]')(item.data)):
|
||||
if oeb.spine.index(item) < 0:
|
||||
oeb.spine.add(item, linear=False)
|
||||
if self.position == 'end':
|
||||
oeb.spine.add(item, linear=False)
|
||||
else:
|
||||
oeb.spine.insert(0, item, linear=True)
|
||||
return
|
||||
elif has_toc:
|
||||
oeb.guide.remove('toc')
|
||||
|
|
|
|||
Loading…
Reference in a new issue