Fix crash when misplaced [--] appear

bzr-revno: 1796
This commit is contained in:
Tim Bentley 2011-11-04 06:56:53 +00:00
commit 19f5c79a6c

View File

@ -250,7 +250,12 @@ class Renderer(object):
# render the first virtual slide.
text_contains_break = u'[---]' in text
if text_contains_break:
text_to_render, text = text.split(u'\n[---]\n', 1)
try:
text_to_render, text = \
text.split(u'\n[---]\n', 1)
except:
text_to_render = text.split(u'\n[---]\n')[0]
text = u''
else:
text_to_render = text
text = u''