mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
MOBI Output: Workaround for Amazon's MOBI renderer not rendering top margins on ul and ol tags. Fixes 744365
This commit is contained in:
parent
28a5223eed
commit
e7b39e9158
@ -206,7 +206,11 @@ class MobiMLizer(object):
|
|||||||
vspace = bstate.vpadding + bstate.vmargin
|
vspace = bstate.vpadding + bstate.vmargin
|
||||||
bstate.vpadding = bstate.vmargin = 0
|
bstate.vpadding = bstate.vmargin = 0
|
||||||
if tag not in TABLE_TAGS:
|
if tag not in TABLE_TAGS:
|
||||||
wrapper.attrib['height'] = self.mobimlize_measure(vspace)
|
if tag in ('ul', 'ol') and vspace > 0:
|
||||||
|
wrapper.addprevious(etree.Element(XHTML('div'),
|
||||||
|
height=self.mobimlize_measure(vspace)))
|
||||||
|
else:
|
||||||
|
wrapper.attrib['height'] = self.mobimlize_measure(vspace)
|
||||||
para.attrib['width'] = self.mobimlize_measure(indent)
|
para.attrib['width'] = self.mobimlize_measure(indent)
|
||||||
elif tag == 'table' and vspace > 0:
|
elif tag == 'table' and vspace > 0:
|
||||||
vspace = int(round(vspace / self.profile.fbase))
|
vspace = int(round(vspace / self.profile.fbase))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user