removed redundant code

This commit is contained in:
Andreas Preikschat 2011-04-29 09:40:44 +02:00
parent d478395ae0
commit e76421190b

View File

@ -429,13 +429,8 @@ class Renderer(object):
Split the slide up by physical line Split the slide up by physical line
""" """
# this parse we do not want to use this so remove it # this parse we do not want to use this so remove it
verses_text = text.split(u'\n') lines = text.split(u'\n')
text = [] return [line for line in lines]
for verse in verses_text:
lines = verse.split(u'\n')
text.extend([line for line in lines])
return text
def _words_split(self, line): def _words_split(self, line):
""" """
@ -443,12 +438,8 @@ class Renderer(object):
""" """
# this parse we are to be wordy # this parse we are to be wordy
line = line.replace(u'\n', u' ') line = line.replace(u'\n', u' ')
verses_text = line.split(u' ') words = line.split(u' ')
text = [] return [word + u' ' for word in words]
for verse in verses_text:
lines = verse.split(u' ')
text.extend([line + u' ' for line in lines])
return text
def _lines_split(self, text): def _lines_split(self, text):
""" """
@ -457,9 +448,4 @@ class Renderer(object):
# this parse we do not want to use this so remove it # this parse we do not want to use this so remove it
text = text.replace(u'\n[---]', u'') text = text.replace(u'\n[---]', u'')
lines = text.split(u'\n') lines = text.split(u'\n')
real_lines = [] return [line.replace(u'[---]', u'') for line in lines]
for line in lines:
line = line.replace(u'[---]', u'')
sub_lines = line.split(u'\n')
real_lines.extend([sub_line for sub_line in sub_lines])
return real_lines