openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #12689
[Merge] lp:~trb143/openlp/bug-884533 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bug-884533 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #884533 in OpenLP: "openLP crashes completely when [---] is incorrectly used."
https://bugs.launchpad.net/openlp/+bug/884533
For more details, see:
https://code.launchpad.net/~trb143/openlp/bug-884533/+merge/81076
Fix case where two [---] lines are next to each other.
--
https://code.launchpad.net/~trb143/openlp/bug-884533/+merge/81076
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bug-884533 into lp:openlp.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2011-10-16 14:40:46 +0000
+++ openlp/core/lib/renderer.py 2011-11-02 20:39:25 +0000
@@ -250,7 +250,12 @@
# 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''
Follow ups