From 330d12c5eb8f41295990945d7a74ff1524825ba1 Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 13 Apr 2011 23:24:34 +0800 Subject: [PATCH] ... --- src/calibre/ebooks/mobi/mobiml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index 40ad5e9e78..3feef7b6f5 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -464,9 +464,10 @@ class MobiMLizer(object): valign = style['vertical-align'] not_baseline = valign in ('super', 'sub', 'text-top', 'text-bottom') or ( - isinstance(valign, (float, int)) and abs(valign) != 0) + isinstance(valign, (float, int)) and abs(valign) != 0) or ( + tag in ('sup', 'sub')) issup = valign in ('super', 'text-top') or ( - isinstance(valign, (float, int)) and valign > 0) + isinstance(valign, (float, int)) and valign > 0) or tag == 'sup' vtag = 'sup' if issup else 'sub' if not_baseline and not ignore_valign and tag not in NOT_VTAGS and not isblock: nroot = etree.Element(XHTML('html'), nsmap=MOBI_NSMAP)