mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
79d31555b2
commit
72ced811c8
@ -192,7 +192,7 @@ class RTFMLizer(object):
|
|||||||
if not isinstance(elem.tag, basestring) \
|
if not isinstance(elem.tag, basestring) \
|
||||||
or namespace(elem.tag) != XHTML_NS:
|
or namespace(elem.tag) != XHTML_NS:
|
||||||
p = elem.getparent()
|
p = elem.getparent()
|
||||||
if isinstance(p.tag, basestring) and namespace(p.tag) == XHTML_NS \
|
if p is not None and isinstance(p.tag, basestring) and namespace(p.tag) == XHTML_NS \
|
||||||
and elem.tail:
|
and elem.tail:
|
||||||
return elem.tail
|
return elem.tail
|
||||||
return u''
|
return u''
|
||||||
|
@ -156,7 +156,7 @@ class TXTMLizer(object):
|
|||||||
if not isinstance(elem.tag, basestring) \
|
if not isinstance(elem.tag, basestring) \
|
||||||
or namespace(elem.tag) != XHTML_NS:
|
or namespace(elem.tag) != XHTML_NS:
|
||||||
p = elem.getparent()
|
p = elem.getparent()
|
||||||
if isinstance(p.tag, basestring) and namespace(p.tag) == XHTML_NS \
|
if p is not None and isinstance(p.tag, basestring) and namespace(p.tag) == XHTML_NS \
|
||||||
and elem.tail:
|
and elem.tail:
|
||||||
return [elem.tail]
|
return [elem.tail]
|
||||||
return ['']
|
return ['']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user