mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output: When converting a paragraph that contains only a non-breaking space into a line break, ignore paragraphs with height less than 2pt. Fixes #915150 (Mobi file to mobi file conversin inserting blank line between every paragraph, even when selecting "Remove spacing between paragraphs")
This commit is contained in:
parent
0689c81895
commit
2e91a7cde6
@ -568,7 +568,11 @@ class MobiMLizer(object):
|
|||||||
if isblock:
|
if isblock:
|
||||||
para = bstate.para
|
para = bstate.para
|
||||||
if para is not None and para.text == u'\xa0' and len(para) < 1:
|
if para is not None and para.text == u'\xa0' and len(para) < 1:
|
||||||
para.getparent().replace(para, etree.Element(XHTML('br')))
|
if style.height > 2:
|
||||||
|
para.getparent().replace(para, etree.Element(XHTML('br')))
|
||||||
|
else:
|
||||||
|
# This is too small to be rendered effectively, drop it
|
||||||
|
para.getparent().remove(para)
|
||||||
bstate.para = None
|
bstate.para = None
|
||||||
bstate.istate = None
|
bstate.istate = None
|
||||||
vmargin = asfloat(style['margin-bottom'])
|
vmargin = asfloat(style['margin-bottom'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user