mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make blockquote detection a bit more fine-grained
See #1857852 (Comment editor converting p's to blockquotes)
This commit is contained in:
parent
e4b00a3573
commit
9b982d3f18
@ -83,7 +83,7 @@ def filter_qt_styles(style):
|
|||||||
|
|
||||||
def remove_margins(tag, style):
|
def remove_margins(tag, style):
|
||||||
ml, mr, mt, mb = (style.pop('margin-' + k, None) for k in 'left right top bottom'.split())
|
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:
|
if is_blockquote:
|
||||||
tag.tag = 'blockquote'
|
tag.tag = 'blockquote'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user