mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-21 05:31:30 +02:00
Removing couple of "buildins" polyglot types
This commit is contained in:
@@ -10,7 +10,6 @@ from ebook_converter.ebooks.oeb.base import XHTML, XHTML_NS, barename, namespace
|
||||
from ebook_converter.ebooks.oeb.stylizer import Stylizer
|
||||
from ebook_converter.ebooks import unit_convert
|
||||
from ebook_converter.ebooks.textile.unsmarten import unsmarten
|
||||
from ebook_converter.polyglot.builtins import string_or_bytes
|
||||
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
@@ -225,10 +224,10 @@ class TextileMLizer(OEB2HTML):
|
||||
'''
|
||||
|
||||
# We can only processes tags. If there isn't a tag return any text.
|
||||
if not isinstance(elem.tag, string_or_bytes) \
|
||||
if not isinstance(elem.tag, (str, bytes)) \
|
||||
or namespace(elem.tag) != XHTML_NS:
|
||||
p = elem.getparent()
|
||||
if p is not None and isinstance(p.tag, string_or_bytes) and namespace(p.tag) == XHTML_NS \
|
||||
if p is not None and isinstance(p.tag, (str, bytes)) and namespace(p.tag) == XHTML_NS \
|
||||
and elem.tail:
|
||||
return [elem.tail]
|
||||
return ['']
|
||||
|
||||
Reference in New Issue
Block a user