[sword-svn] r426 - trunk/modules/python
chrislit at crosswire.org
chrislit at crosswire.org
Mon Jul 1 00:14:13 MST 2013
Author: chrislit
Date: 2013-07-01 00:14:12 -0700 (Mon, 01 Jul 2013)
New Revision: 426
Modified:
trunk/modules/python/usfm2osis.py
Log:
made unhandled tag detection much more lax & greedy, mostly to better indicate encoding errors in source docs
Modified: trunk/modules/python/usfm2osis.py
===================================================================
--- trunk/modules/python/usfm2osis.py 2013-06-22 09:21:20 UTC (rev 425)
+++ trunk/modules/python/usfm2osis.py 2013-07-01 07:14:12 UTC (rev 426)
@@ -1350,7 +1350,7 @@
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 @@
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'
More information about the sword-cvs
mailing list