Fixes to get tests passing in Python 3.

This commit is contained in:
dmpayton
2016-02-23 15:15:29 -08:00
parent 53ba0daa77
commit ee53d85c41
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
from bs4 import BeautifulSoup, NavigableString
import re
import six
convert_heading_re = re.compile(r'convert_h(\d+)')
@@ -61,7 +62,7 @@ class MarkdownConverter(object):
# Convert the children first
for el in node.children:
if isinstance(el, NavigableString):
text += self.process_text(unicode(el))
text += self.process_text(six.text_type(el))
else:
text += self.process_tag(el)