From 54a56df2f26d8d6b127394238c6a94f2ab9f5222 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 1 Sep 2013 13:46:18 +0530 Subject: [PATCH] MOBI Output: Fix some sub/super scripts missing MOBI Output: Fix conversion of some super/sub scripts failling if they are the first or last element in a paragraph. Fixes #1218858 [Subscripted text is generated by chance (MOBI)](https://bugs.launchpad.net/calibre/+bug/1218858) --- src/calibre/ebooks/mobi/mobiml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index 26edeab24c..741b0d6a8d 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -525,6 +525,8 @@ class MobiMLizer(object): else: break if vbstate.para is not None: + if vbstate.para.text: + vtag.text = vbstate.para.text for child in vbstate.para: vtag.append(child) return