From 6528aa6fd1a8811ea70064307386735e5c194e25 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 1 Nov 2010 20:26:42 -0600 Subject: [PATCH] MOBI Output: Fix regression that broke conversion of anchors inside superscripts/subscripts. Fixes #7368 (HTML hyperlinks not found in conversion to mobi) --- src/calibre/ebooks/mobi/mobiml.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index 29b2cc862a..0910d10cfb 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -406,6 +406,12 @@ class MobiMLizer(object): parent = bstate.para if bstate.inline is None else bstate.inline if parent is not None: vtag = etree.SubElement(parent, XHTML(vtag)) + # Add anchors + for child in vbstate.body: + if child is not vbstate.para: + vtag.append(child) + else: + break for child in vbstate.para: vtag.append(child) return