mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Justify MOBI output by default. Fix bug that was causing automatic generation of TOC from links to fail
This commit is contained in:
parent
032c2b0fdc
commit
e6ea2d1e59
@ -39,10 +39,6 @@ class MOBIOutput(OutputFormatPlugin):
|
||||
|
||||
])
|
||||
|
||||
recommendations = set([
|
||||
('dont_justify', True, OptionRecommendation.HIGH),
|
||||
])
|
||||
|
||||
def convert(self, oeb, output_path, input_plugin, opts, log):
|
||||
self.log, self.opts, self.oeb = log, opts, oeb
|
||||
from calibre.ebooks.mobi.writer import PALM_MAX_IMAGE_SIZE, \
|
||||
|
@ -36,8 +36,8 @@ class DetectStructure(object):
|
||||
if self.oeb.toc.count() < 1:
|
||||
if not opts.no_chapters_in_toc and self.detected_chapters:
|
||||
self.create_toc_from_chapters()
|
||||
if self.oeb.toc.count() < opts.toc_threshold:
|
||||
self.create_toc_from_links()
|
||||
if self.oeb.toc.count() < opts.toc_threshold:
|
||||
self.create_toc_from_links()
|
||||
if self.oeb.toc.count() < 2 and orig_toc.count() > 2:
|
||||
self.oeb.toc = orig_toc
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user