forked from openlp/openlp
Try to fix a mediashout import issue by replacing the line tab char with 2 linebreaks.
This commit is contained in:
parent
3a3ca8d933
commit
4754d1eb8b
@ -101,7 +101,7 @@ class MediaShoutImport(SongImport):
|
|||||||
self.song_book_name = song.SongID
|
self.song_book_name = song.SongID
|
||||||
for verse in verses:
|
for verse in verses:
|
||||||
tag = VERSE_TAGS[verse.Type] + str(verse.Number) if verse.Type < len(VERSE_TAGS) else 'O'
|
tag = VERSE_TAGS[verse.Type] + str(verse.Number) if verse.Type < len(VERSE_TAGS) else 'O'
|
||||||
self.add_verse(verse.Text, tag)
|
self.add_verse(self.tidy_text(verse.Text), tag)
|
||||||
for order in verse_order:
|
for order in verse_order:
|
||||||
if order.Type < len(VERSE_TAGS):
|
if order.Type < len(VERSE_TAGS):
|
||||||
self.verse_order_list.append(VERSE_TAGS[order.Type] + str(order.Number))
|
self.verse_order_list.append(VERSE_TAGS[order.Type] + str(order.Number))
|
||||||
|
@ -140,6 +140,7 @@ class SongImport(QtCore.QObject):
|
|||||||
text = text.replace('\u2026', '...')
|
text = text.replace('\u2026', '...')
|
||||||
text = text.replace('\u2013', '-')
|
text = text.replace('\u2013', '-')
|
||||||
text = text.replace('\u2014', '-')
|
text = text.replace('\u2014', '-')
|
||||||
|
text = text.replace('\x0b', '\n\n')
|
||||||
# Remove surplus blank lines, spaces, trailing/leading spaces
|
# Remove surplus blank lines, spaces, trailing/leading spaces
|
||||||
text = re.sub(r'[ \t\v]+', ' ', text)
|
text = re.sub(r'[ \t\v]+', ' ', text)
|
||||||
text = re.sub(r' ?(\r\n?|\n) ?', '\n', text)
|
text = re.sub(r' ?(\r\n?|\n) ?', '\n', text)
|
||||||
|
Loading…
Reference in New Issue
Block a user