forked from openlp/openlp
Fix crash with two soft breaks
This commit is contained in:
parent
14527bf357
commit
3bd0ad9181
@ -229,6 +229,7 @@ class Renderer(object):
|
|||||||
# Songs and Custom
|
# Songs and Custom
|
||||||
elif item.is_capable(ItemCapabilities.CanSoftBreak):
|
elif item.is_capable(ItemCapabilities.CanSoftBreak):
|
||||||
pages = []
|
pages = []
|
||||||
|
#
|
||||||
if u'[---]' in text:
|
if u'[---]' in text:
|
||||||
while True:
|
while True:
|
||||||
slides = text.split(u'\n[---]\n', 2)
|
slides = text.split(u'\n[---]\n', 2)
|
||||||
@ -250,7 +251,12 @@ class Renderer(object):
|
|||||||
# render the first virtual slide.
|
# render the first virtual slide.
|
||||||
text_contains_break = u'[---]' in text
|
text_contains_break = u'[---]' in text
|
||||||
if text_contains_break:
|
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:
|
else:
|
||||||
text_to_render = text
|
text_to_render = text
|
||||||
text = u''
|
text = u''
|
||||||
|
Loading…
Reference in New Issue
Block a user