Skip to content

Commit

Permalink
fixes #661
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed May 13, 2019
1 parent 6e1a8f6 commit d748753
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/nxdl2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def getDocBlocks( ns, node ):
# substitute HTML entities in markup: "<" for "&lt;"
# thanks: http://stackoverflow.com/questions/2087370/decode-html-entities-in-python-string
htmlparser = HTMLParser.HTMLParser()
text = htmlparser.unescape(text)
try: # see #661
import html
text = html.unescape(text)
except ImportError:
text = htmlparser.unescape(text)

# Blocks are separated by whitelines
blocks = re.split( '\n\s*\n', text )
Expand Down

0 comments on commit d748753

Please sign in to comment.