Make blockquote detection a bit more fine-grained

See #1857852 (Comment editor converting p's to blockquotes)
This commit is contained in:
Kovid Goyal 2019-12-30 08:41:44 +05:30
parent e4b00a3573
commit 9b982d3f18
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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'