← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~meths/openlp/testing into lp:openlp

 

Jon Tibble has proposed merging lp:~meths/openlp/testing into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~meths/openlp/testing/+merge/53308

Fix bug with KJ21 not getting the first verse in each chapter because not all bibles are formatted the same way.
-- 
https://code.launchpad.net/~meths/openlp/testing/+merge/53308
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/testing into lp:openlp.
=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py	2011-02-26 00:36:07 +0000
+++ openlp/plugins/bibles/lib/http.py	2011-03-14 19:29:54 +0000
@@ -227,6 +227,10 @@
         cleanup = [(re.compile('\s+'), lambda match: ' ')]
         verses = BeautifulSoup(str(soup), markupMassage=cleanup)
         verse_list = {}
+        # Cater for inconsistent mark up in the first verse of a chapter.
+        first_verse = verses.find(u'versenum')
+        if first_verse:
+            verse_list[1] = unicode(first_verse.contents[0])
         for verse in verses(u'sup', u'versenum'):
             raw_verse_num =  verse.next
             clean_verse_num = 0


Follow ups