mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug #8927: FB2 paragraph spacing issue.
This commit is contained in:
parent
cd9ba96191
commit
f9d405ebe0
@ -350,6 +350,8 @@ class FB2MLizer(object):
|
||||
# Number of blank lines above tag
|
||||
try:
|
||||
ems = int(round((float(style.marginTop) / style.fontSize) - 1))
|
||||
if ems < 0:
|
||||
ems = 0
|
||||
except:
|
||||
ems = 0
|
||||
|
||||
@ -397,7 +399,7 @@ class FB2MLizer(object):
|
||||
fb2_out += p_txt
|
||||
tags += p_tag
|
||||
fb2_out.append('<image xlink:href="#%s" />' % self.image_hrefs[page.abshref(elem_tree.attrib['src'])])
|
||||
if tag in ('br', 'hr') or ems:
|
||||
if tag in ('br', 'hr') or ems >= 1:
|
||||
if ems < 1:
|
||||
multiplier = 1
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user