MOBI Output: Fix regression that breaks conversion of some documents

Fixes #1188635 [Mobi conversion crashed](https://bugs.launchpad.net/calibre/+bug/1188635)
This commit is contained in:
Kovid Goyal 2013-06-07 20:24:39 +05:30
parent 9e105ec028
commit f5c9ad8661

View File

@ -489,7 +489,7 @@ class MobiMLizer(object):
if elem.text:
if istate.preserve:
text = elem.text
elif (len(elem) > 0 and isspace(elem.text) and elem[0].tag and
elif (len(elem) > 0 and isspace(elem.text) and hasattr(elem[0].tag, 'rpartition') and
elem[0].tag.rpartition('}')[-1] not in INLINE_TAGS):
text = None
else: