openlp-core team mailing list archive
  
  - 
     openlp-core team openlp-core team
- 
    Mailing list archive
  
- 
    Message #16071
  
 [Merge] lp:~phill-ridout/openlp/opensong_fix into	lp:openlp
  
phill has proposed merging lp:~phill-ridout/openlp/opensong_fix into lp:openlp.
Requested reviews:
  OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/opensong_fix/+merge/110890
A fix for a number of historic issues on the tracker:
http://support.openlp.org/issues/475
http://support.openlp.org/issues/492
http://support.openlp.org/issues/661
being the most recent.
-- 
https://code.launchpad.net/~phill-ridout/openlp/opensong_fix/+merge/110890
Your team OpenLP Core is requested to review the proposed merge of lp:~phill-ridout/openlp/opensong_fix into lp:openlp.
=== modified file 'openlp/plugins/songs/lib/opensongimport.py'
--- openlp/plugins/songs/lib/opensongimport.py	2012-04-29 15:31:56 +0000
+++ openlp/plugins/songs/lib/opensongimport.py	2012-06-18 19:31:25 +0000
@@ -187,8 +187,9 @@
                 content = this_line[1:right_bracket].lower()
                 # have we got any digits?
                 # If so, verse number is everything from the digits
-                # to the end (even if there are some alpha chars on the end)
-                match = re.match(u'(\D*)(\d+.*)', content)
+                # to the end (openlp does not have concept of part verses, so
+                # just ignore any non integers on the end (including floats))
+                match = re.match(u'(\D*)(\d+)', content)
                 if match is not None:
                     verse_tag = match.group(1)
                     verse_num = match.group(2)
Follow ups