fixed if statement
This commit is contained in:
parent
aecd401c6e
commit
77f5dec68b
1 changed files with 1 additions and 1 deletions
|
|
@ -751,7 +751,7 @@ class Renderer(object):
|
||||||
styles_cache = {} # cache styles searching
|
styles_cache = {} # cache styles searching
|
||||||
html_text = markdown(markdown_text)
|
html_text = markdown(markdown_text)
|
||||||
encoded = html_text.encode('ascii', 'xmlcharrefreplace')
|
encoded = html_text.encode('ascii', 'xmlcharrefreplace')
|
||||||
if not PY2:
|
if isinstance(encoded, bytes):
|
||||||
# In PY3 bytes-like object needs convert to str
|
# In PY3 bytes-like object needs convert to str
|
||||||
encoded = encoded.decode('ascii')
|
encoded = encoded.decode('ascii')
|
||||||
xml_object = parseString('<html>%s</html>' % encoded)
|
xml_object = parseString('<html>%s</html>' % encoded)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue