From ee5e4580a68d4dc10ade2ebffdc57ce60922e5d1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 15 Jul 2016 19:52:38 +0530 Subject: [PATCH] MOBI Output: Fix
not being rendered as full-width in old MOBI files --- src/calibre/ebooks/mobi/mobiml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index 11df25f18d..4ceec726f7 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -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':