Fix #1137 (Soft Hyphens on Epub file)

This commit is contained in:
Kovid Goyal 2008-10-06 10:07:58 -07:00
parent 5c73f9eb64
commit 57a3fee974
2 changed files with 5 additions and 0 deletions

View File

@ -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 = {

View File

@ -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):