Fix issue with more new lines when having more <lines> element in openlyrics document.

This commit is contained in:
Martin Zibricky 2011-09-19 14:59:37 +02:00
parent b27784e838
commit 039115c7f4

View File

@ -638,10 +638,13 @@ class OpenLyrics(object):
if text: if text:
text += u'\n' text += u'\n'
# Loop over the "line" elements removing chords. # Loop over the "line" elements removing chords.
lines_text = u''
for line in lines.line: for line in lines.line:
if text: if lines_text:
text += u'\n' lines_text += u'\n'
text += self._process_verse_line(line) lines_text += self._process_verse_line(line)
# Append text from "lines" element to verse text.
text += lines_text
# Add a virtual split to the verse text. # Add a virtual split to the verse text.
if lines.get(u'break') is not None: if lines.get(u'break') is not None:
text += u'\n[---]' text += u'\n[---]'