diff options
-rwxr-xr-x | python/swordutils/osis/genbookOsis2Commentary.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/swordutils/osis/genbookOsis2Commentary.py b/python/swordutils/osis/genbookOsis2Commentary.py index d3c865a..34e4314 100755 --- a/python/swordutils/osis/genbookOsis2Commentary.py +++ b/python/swordutils/osis/genbookOsis2Commentary.py @@ -19,7 +19,10 @@ def isRoot(n): 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): |