mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Comments editor: Fix inserted blank paragraph being rendered as two lines.
Qt uses an awful hack of inserting style="-qt-paragraph-type:empty" for blank paragraphs. Preserve this, so that blank paragraphs survive round tripping as HTML, at the cost of uglier markup.
This commit is contained in:
parent
9df4be4015
commit
d70363d408
@ -77,7 +77,8 @@ def lift_styles(tag, style_map):
|
|||||||
|
|
||||||
def filter_qt_styles(style):
|
def filter_qt_styles(style):
|
||||||
for k in tuple(style):
|
for k in tuple(style):
|
||||||
if k.startswith('-qt-'):
|
# -qt-paragraph-type is a hack used by Qt for empty paragraphs
|
||||||
|
if k.startswith('-qt-') and k != '-qt-paragraph-type':
|
||||||
del style[k]
|
del style[k]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user