forked from openlp/openlp
more clean ups
This commit is contained in:
parent
d3bfffa4b1
commit
91c20c4271
@ -82,13 +82,16 @@ class BGExtract(object):
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
footnotes = soup.findAll(u'sup', u'footnote')
|
||||
if footnotes:
|
||||
[footnote.extract() for footnote in footnotes]
|
||||
for footnote in footnotes:
|
||||
footnote.extract()
|
||||
crossrefs = soup.findAll(u'sup', u'xref')
|
||||
if crossrefs:
|
||||
[crossref.extract() for crossref in crossrefs]
|
||||
for crossref in crossrefs:
|
||||
crossref.extract()
|
||||
headings = soup.findAll(u'h5')
|
||||
if headings:
|
||||
[heading.extract() for heading in headings]
|
||||
for heading in headings:
|
||||
heading.extract()
|
||||
cleanup = [(re.compile('\s+'), lambda match: ' ')]
|
||||
verses = BeautifulSoup(str(soup), markupMassage=cleanup)
|
||||
verse_list = {}
|
||||
|
@ -333,5 +333,6 @@ class CCLIFileImport(SongImport):
|
||||
if len(author_list) < 2:
|
||||
author_list = song_author.split(u'|')
|
||||
# Clean spaces before and after author names.
|
||||
[self.addAuthor(author_name.strip()) for author_name in author_list]
|
||||
for author_name in author_list:
|
||||
self.addAuthor(author_name.strip())
|
||||
return self.finish()
|
||||
|
Loading…
Reference in New Issue
Block a user