From 9b982d3f18b1d27b02257ffdc3c440a750c78786 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 30 Dec 2019 08:41:44 +0530 Subject: [PATCH] Make blockquote detection a bit more fine-grained See #1857852 (Comment editor converting p's to blockquotes) --- src/calibre/gui2/comments_editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 451ae4414f..1bd3d3137e 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -83,7 +83,7 @@ def filter_qt_styles(style): def remove_margins(tag, style): ml, mr, mt, mb = (style.pop('margin-' + k, None) for k in 'left right top bottom'.split()) - is_blockquote = ml == mr and ml and ml != '0px' + is_blockquote = ml == mr and ml and ml != '0px' and (ml != mt or ml != mb) if is_blockquote: tag.tag = 'blockquote'