diff --git a/src/calibre/ebooks/fb2/fb2ml.py b/src/calibre/ebooks/fb2/fb2ml.py index 46e52fdd13..8b74efe9e7 100644 --- a/src/calibre/ebooks/fb2/fb2ml.py +++ b/src/calibre/ebooks/fb2/fb2ml.py @@ -79,7 +79,7 @@ class FB2MLizer(object): text = re.sub(r'(?mu)<(strong|emphasis|strikethrough|sub|sup)>(\s*)', r'\2', text) # Clean up paragraphs endings. - text = re.sub(r'(?mu)\s+

', '

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

', '

', text) # Condense empty paragraphs into a line break. text = re.sub(r'(?mu)(?:

\s*){3,}', '', text) # Remove empty paragraphs.