Justify MOBI output by default. Fix bug that was causing automatic generation of TOC from links to fail

This commit is contained in:
Kovid Goyal 2009-06-23 08:33:36 -07:00
parent 032c2b0fdc
commit e6ea2d1e59
2 changed files with 2 additions and 6 deletions

View File

@ -39,10 +39,6 @@ class MOBIOutput(OutputFormatPlugin):
]) ])
recommendations = set([
('dont_justify', True, OptionRecommendation.HIGH),
])
def convert(self, oeb, output_path, input_plugin, opts, log): def convert(self, oeb, output_path, input_plugin, opts, log):
self.log, self.opts, self.oeb = log, opts, oeb self.log, self.opts, self.oeb = log, opts, oeb
from calibre.ebooks.mobi.writer import PALM_MAX_IMAGE_SIZE, \ from calibre.ebooks.mobi.writer import PALM_MAX_IMAGE_SIZE, \

View File

@ -36,8 +36,8 @@ class DetectStructure(object):
if self.oeb.toc.count() < 1: if self.oeb.toc.count() < 1:
if not opts.no_chapters_in_toc and self.detected_chapters: if not opts.no_chapters_in_toc and self.detected_chapters:
self.create_toc_from_chapters() self.create_toc_from_chapters()
if self.oeb.toc.count() < opts.toc_threshold: if self.oeb.toc.count() < opts.toc_threshold:
self.create_toc_from_links() self.create_toc_from_links()
if self.oeb.toc.count() < 2 and orig_toc.count() > 2: if self.oeb.toc.count() < 2 and orig_toc.count() > 2:
self.oeb.toc = orig_toc self.oeb.toc = orig_toc
else: else: