From 7b37de43371a4df661bc904d34dd2d8a24009d71 Mon Sep 17 00:00:00 2001 From: Chris Little Date: Mon, 1 Jul 2013 07:14:12 +0000 Subject: 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 --- modules/python/usfm2osis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/python') 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('
', '
') 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 += '\n\n' -- cgit