mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
6649e95e35
commit
4fd784a9c1
@ -496,12 +496,9 @@ class HeuristicProcessor(object):
|
|||||||
if hardbreaks or unwrap_factor < 0.4:
|
if hardbreaks or unwrap_factor < 0.4:
|
||||||
self.log.debug("Unwrapping required, unwrapping Lines")
|
self.log.debug("Unwrapping required, unwrapping Lines")
|
||||||
# Dehyphenate with line length limiters
|
# Dehyphenate with line length limiters
|
||||||
dehyphenator = Dehyphenator()
|
dehyphenator = Dehyphenator(self.extra_opts.verbose, self.log)
|
||||||
html = dehyphenator(html,'html', length)
|
html = dehyphenator(html,'html', length)
|
||||||
html = self.punctuation_unwrap(length, html, 'html')
|
html = self.punctuation_unwrap(length, html, 'html')
|
||||||
# unwrap remaining hyphens based on line length, but only remove if there is a match
|
|
||||||
dehyphenator = Dehyphenator(self.extra_opts.verbose, self.log)
|
|
||||||
html = dehyphenator(html,'html_cleanup', length)
|
|
||||||
|
|
||||||
if getattr(self.extra_opts, 'dehyphenate', False):
|
if getattr(self.extra_opts, 'dehyphenate', False):
|
||||||
# dehyphenate in cleanup mode to fix anything previous conversions/editing missed
|
# dehyphenate in cleanup mode to fix anything previous conversions/editing missed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user