[sword-svn] r132 - trunk/python/swordutils/osis

lukeplant at www.crosswire.org lukeplant at www.crosswire.org
Tue Jan 8 11:02:19 MST 2008


Author: lukeplant
Date: 2008-01-08 11:02:19 -0700 (Tue, 08 Jan 2008)
New Revision: 132

Modified:
   trunk/python/swordutils/osis/genbookOsis2Commentary.py
Log:
Small fix for reversifying osis commentaries


Modified: trunk/python/swordutils/osis/genbookOsis2Commentary.py
===================================================================
--- trunk/python/swordutils/osis/genbookOsis2Commentary.py	2008-01-08 18:01:16 UTC (rev 131)
+++ trunk/python/swordutils/osis/genbookOsis2Commentary.py	2008-01-08 18:02:19 UTC (rev 132)
@@ -19,7 +19,10 @@
             and n.nodeName == u'osis')
 
 def isVerseDiv(n):
-    return n.nodeName == u'div' and n.attributes.has_key(u'osisID')
+    # we must only match things like: "Ps.1.1" 
+    # and not: "Ps.1" 
+    return n.nodeName == u'div' and n.attributes.has_key(u'osisID') \
+        and len(n.attributes['osisID'].value.split('.')) == 3
 
 class VerseRef(object):
     def __init__(self, ref):




More information about the sword-cvs mailing list