don't try and replace nbsp

This commit is contained in:
Damien Elmes 2011-12-20 12:47:56 +09:00
parent 3449abe8a0
commit 2012d0de39

View file

@ -63,6 +63,8 @@ def _latexFromHtml(col, latex):
"Convert entities and fix newlines."
for match in re.compile("&([a-z]+);", re.IGNORECASE).finditer(latex):
if match.group(1) in entitydefs:
if match.group() == " ":
continue
latex = latex.replace(match.group(), entitydefs[match.group(1)])
latex = re.sub("<br( /)?>", "\n", latex)
latex = stripHTML(latex)