mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1137 (Soft Hyphens on Epub file)
This commit is contained in:
parent
5c73f9eb64
commit
57a3fee974
@ -15,11 +15,13 @@ class DefaultProfile(object):
|
|||||||
|
|
||||||
flow_size = sys.maxint
|
flow_size = sys.maxint
|
||||||
screen_size = None
|
screen_size = None
|
||||||
|
remove_soft_hyphens = False
|
||||||
|
|
||||||
class PRS505(DefaultProfile):
|
class PRS505(DefaultProfile):
|
||||||
|
|
||||||
flow_size = 300000
|
flow_size = 300000
|
||||||
screen_size = (600, 775)
|
screen_size = (600, 775)
|
||||||
|
remove_soft_hyphens = True
|
||||||
|
|
||||||
|
|
||||||
PROFILES = {
|
PROFILES = {
|
||||||
|
@ -364,6 +364,9 @@ class PreProcessor(object):
|
|||||||
return '<!-- created by calibre\'s pdftohtml -->' in src[:1000]
|
return '<!-- created by calibre\'s pdftohtml -->' in src[:1000]
|
||||||
|
|
||||||
def preprocess(self, html):
|
def preprocess(self, html):
|
||||||
|
opts = getattr(self, 'opts', False)
|
||||||
|
if opts and hasattr(opts, 'profile') and getattr(opts.profile, 'remove_soft_hyphens', False):
|
||||||
|
html = html.replace(u'\u00ad', '')
|
||||||
if self.is_baen(html):
|
if self.is_baen(html):
|
||||||
rules = []
|
rules = []
|
||||||
elif self.is_book_designer(html):
|
elif self.is_book_designer(html):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user