| changeset 459 | a69421197502 |
| parent 458 | ba7e05582435 |
| child 517 | e7bc083fa9dc |
--- a/src/cm/converters/pandoc_converters.py Thu Aug 09 13:05:11 2012 +0200 +++ b/src/cm/converters/pandoc_converters.py Thu Aug 09 16:55:25 2012 +0200 @@ -223,7 +223,8 @@ stdoutdata = (content.encode('utf8')) soup = BeautifulSoup(stdoutdata) body = soup.body - stdoutdata = body.renderContents() + if body: + stdoutdata = body.renderContents() # strip leading spaces stdoutdata = re.sub(r"^\s+", '', stdoutdata) # add new line before closing bracket