diff options
author | Chris Little <chrislit@crosswire.org> | 2012-08-12 18:38:29 +0000 |
---|---|---|
committer | Chris Little <chrislit@crosswire.org> | 2012-08-12 18:38:29 +0000 |
commit | 994118d1fcb57e4395ae5cbb9325a67305f2d9a5 (patch) | |
tree | 3a9cd1e5318e668bf2aad6b8bf01cac166ac9ee2 /modules/python/usfm2osis.py | |
parent | da6c19834d117055cd839fbd84bc34841787764c (diff) | |
download | sword-tools-994118d1fcb57e4395ae5cbb9325a67305f2d9a5.tar.gz |
On second thought, this is clearly a source encoding error and should not fail so gracefully. Descending verse ranges should produce invalid XML.
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@384 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/python/usfm2osis.py')
-rwxr-xr-x | modules/python/usfm2osis.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/python/usfm2osis.py b/modules/python/usfm2osis.py index 664cfdd..eed7f09 100755 --- a/modules/python/usfm2osis.py +++ b/modules/python/usfm2osis.py @@ -1004,7 +1004,7 @@ def convertToOSIS(sFile): def expandRange(vRange): vRange = re.findall(r'\d+', vRange) osisID = list() - for n in range(int(vRange[0]), max(int(vRange[0]), int(vRange[1]))+1): + for n in range(int(vRange[0]), int(vRange[1])+1): osisID.append('$BOOK$.$CHAP$.'+str(n)) return ' '.join(osisID) osis = re.sub(r'\$BOOK\$\.\$CHAP\$\.(\d+-\d+)"', lambda m: expandRange(m.group(1))+'"', osis) |