diff --git a/src/calibre/library/comments.py b/src/calibre/library/comments.py index fe3853d656..1e312d5b5b 100644 --- a/src/calibre/library/comments.py +++ b/src/calibre/library/comments.py @@ -134,7 +134,8 @@ def markdown(val): except AttributeError: from calibre.ebooks.markdown import Markdown md = markdown.Markdown = Markdown() - return md.convert(val) + val = md.convert(val) + return re.sub(r'
]*?)>\s*
\s*
\xa0
', val) def merge_comments(one, two):