fix missing end spaces

This commit is contained in:
Tomas Groth 2017-01-26 22:14:19 +01:00
parent 56d2eaa4c2
commit 02d6a42ac4
2 changed files with 7 additions and 4 deletions

View File

@ -246,7 +246,7 @@ class OpenLP(OpenLPMixin, QtWidgets.QApplication):
Settings().setValue('core/application version', openlp_version)
# If data_version is different from the current version ask if we should backup the data folder
elif data_version != openlp_version:
if self.splash.isVisible():
if can_show_splash and self.splash.isVisible():
self.splash.hide()
if QtWidgets.QMessageBox.question(None, translate('OpenLP', 'Backup'),
translate('OpenLP', 'OpenLP has been upgraded, do you want to create\n'

View File

@ -292,7 +292,7 @@ def clean_tags(text, remove_chords=False):
"""
text = text.replace('<br>', '\n')
text = text.replace('{br}', '\n')
text = text.replace('&nbsp;', ' ')
#text = text.replace('&nbsp;', ' ')
for tag in FormattingTags.get_html_tags():
text = text.replace(tag['start tag'], '')
text = text.replace(tag['end tag'], '')
@ -430,8 +430,11 @@ def expand_chords(text):
for note in notes:
new_line += '<td class="note">%s</td>' % note
new_line += '</tr><tr>'
for lyric in lyrics:
new_line += '<td class="lyrics">%s&nbsp;</td>' % lyric
for i in range(len(lyrics)):
end_space = ''
if i + 1 == len(lyrics):
end_space = '&nbsp;'
new_line += '<td class="lyrics">%s%s</td>' % (lyrics[i], end_space)
new_line += '</tr>'
else:
new_line += '<tr><td class="note">&nbsp;</td></tr><tr><td class="lyrics">%s&nbsp;</td></tr>' % word