diff --git a/src/calibre/ebooks/fb2/fb2ml.py b/src/calibre/ebooks/fb2/fb2ml.py index fb3c7f34f7..d0b680009a 100644 --- a/src/calibre/ebooks/fb2/fb2ml.py +++ b/src/calibre/ebooks/fb2/fb2ml.py @@ -91,8 +91,9 @@ class FB2MLizer(object): return u'\n%s' % etree.tostring(etree.fromstring(output), encoding=unicode, pretty_print=True) def clean_text(self, text): - text = re.sub(r'

\s*

', '', text) - + text = re.sub(r'(?miu)

\s*

', '', text) + text = re.sub(r'(?miu)\s+

', '

', text) + text = re.sub(r'(?miu)

', '

\n\n

', text) return text def fb2_header(self):