You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/daaray/.virtualenvs/conf_site/local/lib/python2.7/site-packages/sy
mposion/markdown_parser.py", line 15, in parse
for token in parser.parseFragment(text).childNodes:
AttributeError: childNodes
We need to either revert the pin to 0.95 or modify the parser by specifying the tree builder:
from html5lib import html5parser, sanitizer, getTreeBuilder
import markdown
def parse(text):
# First run through the Markdown parser
text = markdown.markdown(text, extensions=["extra"], safe_mode=False)
# Sanitize using html5lib
bits = []
parser = html5parser.HTMLParser(tokenizer=sanitizer.HTMLSanitizer, tree=getTreeBuilder("dom"))
for token in parser.parseFragment(text).childNodes:
bits.append(token.toxml())
return "".join(bits)
The text was updated successfully, but these errors were encountered:
The pinned requirement causes the markdown parser to throw errors:
This is due to html5lib/html5lib-python#45.
We need to either revert the pin to 0.95 or modify the parser by specifying the tree builder:
The text was updated successfully, but these errors were encountered: