forked from openlp/openlp
_paginate_slide_words detects long verses itself
This commit is contained in:
parent
f4c00009ed
commit
f22e1385be
@ -222,21 +222,23 @@ class Renderer(object):
|
|||||||
line_end = u'<br>'
|
line_end = u'<br>'
|
||||||
if item.is_capable(ItemCapabilities.NoLineBreaks):
|
if item.is_capable(ItemCapabilities.NoLineBreaks):
|
||||||
line_end = u' '
|
line_end = u' '
|
||||||
# clean up line endings
|
# Bibles
|
||||||
lines = self._lines_split(text)
|
if item.is_capable(ItemCapabilities.AllowsWordSplit):
|
||||||
pages = self._paginate_slide(lines, line_end)
|
pages = self._paginate_slide_words(text, line_end)
|
||||||
if len(pages) > 1:
|
else:
|
||||||
# Songs and Custom
|
# Clean up line endings.
|
||||||
if item.is_capable(ItemCapabilities.AllowsVirtualSplit):
|
lines = self._lines_split(text)
|
||||||
# Do not forget the line breaks !
|
pages = self._paginate_slide(lines, line_end)
|
||||||
slides = text.split(u'[---]')
|
#TODO: Maybe move the detection to _paginate_slide.
|
||||||
pages = []
|
if len(pages) > 1:
|
||||||
for slide in slides:
|
# Songs and Custom
|
||||||
lines = slide.strip(u'\n').split(u'\n')
|
if item.is_capable(ItemCapabilities.AllowsVirtualSplit):
|
||||||
pages.extend(self._paginate_slide(lines, line_end))
|
# Do not forget the line breaks!
|
||||||
# Bibles
|
slides = text.split(u'[---]')
|
||||||
elif item.is_capable(ItemCapabilities.AllowsWordSplit):
|
pages = []
|
||||||
pages = self._paginate_slide_words(text, line_end)
|
for slide in slides:
|
||||||
|
lines = slide.strip(u'\n').split(u'\n')
|
||||||
|
pages.extend(self._paginate_slide(lines, line_end))
|
||||||
new_pages = []
|
new_pages = []
|
||||||
for page in pages:
|
for page in pages:
|
||||||
while page.endswith(u'<br>'):
|
while page.endswith(u'<br>'):
|
||||||
|
Loading…
Reference in New Issue
Block a user