From 51c14bdf5131e907a8109ae48abc52c0f084c9f4 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 20 Apr 2014 15:24:18 +0200 Subject: [PATCH] fixed bug 1296104 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 233af3784..e24381558 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -248,6 +248,9 @@ class Renderer(OpenLPMixin, RegistryMixin, RegistryProperties): elif item.is_capable(ItemCapabilities.CanSoftBreak): pages = [] if '[---]' 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('\n[---]\n', 2) # If there are (at least) two occurrences of [---] we use the first two slides (and neglect the last