From e20e8dd0f57093eea0001f40f0be7c7cc5ca2699 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 1 Aug 2011 10:08:46 -0600 Subject: [PATCH] MOBI Output: Fix bug that caused paragraphs that had only a non breaking space as text before the first child element to be removed. Fixes #819058 (EPUB->MOBI conversion omitting some blockquotes) --- src/calibre/ebooks/mobi/mobiml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index d108742f3c..eefa9d9e03 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -532,7 +532,7 @@ class MobiMLizer(object): bstate.pbreak = True if isblock: para = bstate.para - if para is not None and para.text == u'\xa0': + if para is not None and para.text == u'\xa0' and len(para) < 1: para.getparent().replace(para, etree.Element(XHTML('br'))) bstate.para = None bstate.istate = None