From 18c98916b40c2f4a7d927caa041168308e77eea0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 1 Oct 2016 22:25:32 +0530 Subject: [PATCH] Fix typo --- src/calibre/ebooks/mobi/writer8/toc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/mobi/writer8/toc.py b/src/calibre/ebooks/mobi/writer8/toc.py index 1d064b2068..ab8ff87819 100644 --- a/src/calibre/ebooks/mobi/writer8/toc.py +++ b/src/calibre/ebooks/mobi/writer8/toc.py @@ -44,7 +44,7 @@ def find_previous_calibre_inline_toc(oeb): class TOCAdder(object): - def __init__(self, oeb, opts, replace_previous_inline_toc=False, ignore_existing_toc=False): + def __init__(self, oeb, opts, replace_previous_inline_toc=True, ignore_existing_toc=False): self.oeb, self.opts, self.log = oeb, opts, oeb.log self.title = opts.toc_title or DEFAULT_TITLE self.at_start = opts.mobi_toc_at_start @@ -53,7 +53,7 @@ class TOCAdder(object): self.has_toc = oeb.toc and oeb.toc.count() > 1 self.tocitem = tocitem = None - if find_previous_calibre_inline_toc: + if replace_previous_inline_toc: tocitem = self.tocitem = find_previous_calibre_inline_toc(oeb) if ignore_existing_toc and 'toc' in oeb.guide: oeb.guide.remove('toc')