This commit is contained in:
Andreas Preikschat 2011-08-30 17:15:39 +02:00
parent 25ce484fb1
commit 71bdaf0708

View File

@ -248,9 +248,10 @@ class Renderer(object):
# slide. Replace the first occurrence of [---]. # slide. Replace the first occurrence of [---].
text = text.replace(u'\n[---]', u'', 1) text = text.replace(u'\n[---]', u'', 1)
else: else:
# The first virtual slide fits, which means # The first virtual slide fits, which means we have to
# we have to render the first virtual slide. # render the first virtual slide.
if u'[---]' in text: text_contains_break = u'[---]' in text
if text_contains_break:
text_to_render, text = text.split(u'\n[---]\n', 1) text_to_render, text = text.split(u'\n[---]\n', 1)
else: else:
text_to_render = text text_to_render = text
@ -258,8 +259,7 @@ class Renderer(object):
lines = text_to_render.strip(u'\n').split(u'\n') lines = text_to_render.strip(u'\n').split(u'\n')
slides = self._paginate_slide(lines, line_end) slides = self._paginate_slide(lines, line_end)
if len(slides) > 1 and text: if len(slides) > 1 and text:
# Add all slides apart from the last one the # Add all slides apart from the last one the list.
# list.
pages.extend(slides[:-1]) pages.extend(slides[:-1])
if text_contains_break: if text_contains_break:
text = slides[-1] + u'\n[---]\n' + text text = slides[-1] + u'\n[---]\n' + text