MOBI Output: Fix <hr> not being rendered as full-width in old MOBI files

This commit is contained in:
Kovid Goyal 2016-07-15 19:52:38 +05:30
parent 28c548bccb
commit ee5e4580a6

View File

@ -468,7 +468,8 @@ class MobiMLizer(object):
pass
istate.attrib['height'] = str(int(height))
item.unload_data_from_memory()
elif tag == 'hr' and asfloat(style['width']) > 0:
elif tag == 'hr' and asfloat(style['width']) > 0 and style._get('width') not in {'100%', 'auto'}:
rawti = style._get('text-indent')
prop = style['width'] / self.profile.width
istate.attrib['width'] = "%d%%" % int(round(prop * 100))
elif display == 'table':