mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-03 14:06:16 +01:00
...
This commit is contained in:
parent
40242a87cb
commit
46f51ee940
3 changed files with 3 additions and 2 deletions
|
|
@ -352,6 +352,7 @@ def dump_text(self, elem_tree, stylizer, page, tag_stack=[]):
|
|||
@return: List of string representing the XHTML converted to FB2 markup.
|
||||
'''
|
||||
from calibre.ebooks.oeb.base import XHTML_NS, barename, namespace
|
||||
elem = elem_tree
|
||||
|
||||
# Ensure what we are converting is not a string and that the fist tag is part of the XHTML namespace.
|
||||
if not isinstance(elem_tree.tag, basestring) or namespace(elem_tree.tag) != XHTML_NS:
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ def clean_text(self, text):
|
|||
def dump_text(self, elem, stylizer, page, tag_stack=[]):
|
||||
from calibre.ebooks.oeb.base import XHTML_NS, barename, namespace
|
||||
|
||||
if not isinstance(elem_tree.tag, basestring) or namespace(elem_tree.tag) != XHTML_NS:
|
||||
if not isinstance(elem.tag, basestring) or namespace(elem.tag) != XHTML_NS:
|
||||
p = elem.getparent()
|
||||
if p is not None and isinstance(p.tag, basestring) and namespace(p.tag) == XHTML_NS \
|
||||
and elem.tail:
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ def clean_text(self, text):
|
|||
def dump_text(self, elem, stylizer, page, tag_stack=[]):
|
||||
from calibre.ebooks.oeb.base import XHTML_NS, barename, namespace
|
||||
|
||||
if not isinstance(elem_tree.tag, basestring) or namespace(elem_tree.tag) != XHTML_NS:
|
||||
if not isinstance(elem.tag, basestring) or namespace(elem.tag) != XHTML_NS:
|
||||
p = elem.getparent()
|
||||
if p is not None and isinstance(p.tag, basestring) and namespace(p.tag) == XHTML_NS \
|
||||
and elem.tail:
|
||||
|
|
|
|||
Loading…
Reference in a new issue