mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 05:53:10 +02:00
Fix regression taht broke RTF conversion on some linux systems
This commit is contained in:
parent
fa4986e6c8
commit
3a7da561cc
1 changed files with 2 additions and 1 deletions
|
|
@ -292,7 +292,8 @@ def convert(self, stream, options, file_ext, log,
|
|||
# Replace newlines inserted by the 'empty_paragraphs' option in rtf2xml with html blank lines
|
||||
if not getattr(self.options, 'remove_paragraph_spacing', False):
|
||||
res = re.sub('\s*<body>', '<body>', res)
|
||||
res = re.sub('(?<=\n)\n{2}', u'<p>\u00a0</p>\n', res)
|
||||
res = re.sub('(?<=\n)\n{2}',
|
||||
u'<p>\u00a0</p>\n'.encode('utf-8'), res)
|
||||
if self.options.preprocess_html:
|
||||
preprocessor = PreProcessor(self.options, log=getattr(self, 'log', None))
|
||||
res = preprocessor(res)
|
||||
|
|
|
|||
Loading…
Reference in a new issue