forked from openlp/openlp
Fix crash when misplaced [--] appear
bzr-revno: 1796
This commit is contained in:
commit
19f5c79a6c
@ -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''
|
||||
|
Loading…
Reference in New Issue
Block a user