From cfe2ff3c4b124817ec1233f1b6a94cb83303677a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 24 Apr 2023 22:42:00 +0530 Subject: [PATCH] Add a comment explaining why we regex the markdown output --- src/calibre/library/comments.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/library/comments.py b/src/calibre/library/comments.py index 1e312d5b5b..21320e28cc 100644 --- a/src/calibre/library/comments.py +++ b/src/calibre/library/comments.py @@ -135,6 +135,8 @@ def markdown(val): from calibre.ebooks.markdown import Markdown md = markdown.Markdown = Markdown() val = md.convert(val) + # The Qt Rich text widgets display


as two blank lines instead + # of one so fix that here. return re.sub(r']*?)>\s*\s*

','\xa0

', val)