From ad0e6a29f20b1a32ce5b453b83509f34ba5918be Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sat, 22 Mar 2014 18:59:22 +0100 Subject: [PATCH] Fixed bug #1296104 ( Renderer broken when two option breaks next to each other) Fixes: https://launchpad.net/bugs/1296104 --- openlp/core/lib/renderer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 411575d77..a1f64804f 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -284,6 +284,9 @@ class Renderer(object): elif item.is_capable(ItemCapabilities.CanSoftBreak): pages = [] if u'[---]' in text: + # Remove two or more option slide breaks next to each other (causing infinite loop). + while u'\n[---]\n[---]\n' in text: + text = text.replace(u'\n[---]\n[---]\n', u'\n[---]\n') while True: slides = text.split(u'\n[---]\n', 2) # If there are (at least) two occurrences of [---] we use