summaryrefslogtreecommitdiffstats
path: root/modules/python
diff options
context:
space:
mode:
authorChris Little <chrislit@crosswire.org>2013-07-01 07:14:12 +0000
committerChris Little <chrislit@crosswire.org>2013-07-01 07:14:12 +0000
commit7b37de43371a4df661bc904d34dd2d8a24009d71 (patch)
treebeadb51d6082744d86342b3555889bafc322589f /modules/python
parent82c9d8a327130d9b8e47526f9583f51d862ec96f (diff)
downloadsword-tools-7b37de43371a4df661bc904d34dd2d8a24009d71.tar.gz
made unhandled tag detection much more lax & greedy, mostly to better indicate encoding errors in source docs
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@426 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/python')
-rwxr-xr-xmodules/python/usfm2osis.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/python/usfm2osis.py b/modules/python/usfm2osis.py
index 2d00ef5..e5e499f 100755
--- a/modules/python/usfm2osis.py
+++ b/modules/python/usfm2osis.py
@@ -1350,7 +1350,7 @@ def convertToOsis(sFile):
osis = osis.replace('<div type="book" osisID="' + sb + '">', '<div type="' + sb.lower() + '">')
if DEBUG:
- localUnhandledTags = set(re.findall(r'(\\[^\s\*]+?\b\*?)', osis))
+ localUnhandledTags = set(re.findall(r'(\\[^\s]*)', osis))
if localUnhandledTags:
print(('Unhandled USFM tags in ' + sFile + ': ' + ', '.join(localUnhandledTags) + ' (' + str(len(localUnhandledTags)) + ' total)'))
@@ -1573,7 +1573,7 @@ if __name__ == "__main__":
unhandledTags = set()
for doc in usfmDocList:
- unhandledTags |= set(re.findall(r'(\\[^\s\*]+?\b\*?)', osisSegment[doc]))
+ unhandledTags |= set(re.findall(r'(\\[^\s]*)', osisSegment[doc]))
osisDoc += osisSegment[doc]
osisDoc += '</osisText>\n</osis>\n'