[Zope-Checkins] CVS: Zope/lib/python/StructuredText - DocumentClass.py:1.36

Andreas Jung andreas@zope.com
Fri, 19 Oct 2001 09:21:40 -0400


Update of /cvs-repository/Zope/lib/python/StructuredText
In directory cvs.zope.org:/tmp/cvs-serv32122

Modified Files:
	DocumentClass.py 
Log Message:
- _..._ was still broken. Even more __....__ was broken. Underlines are evil. 
- added script to recreate regression reference files
- added another test



=== Zope/lib/python/StructuredText/DocumentClass.py 1.35 => 1.36 ===
                       s,
                       #expr=re.compile(r"\_([a-zA-Z0-9\s\.,\?]+)\_").search, # old expr, inconsistent punc, failed to cross newlines
-                      expr=re.compile(r'_([%s%s%s\s]+)_' % (letters, digits, under_punc)).search):
+                      expr=re.compile(r'_([%s%s%s\s]+)_[\s%s]' % (letters, digits, under_punc,phrase_delimiters)).search):
 
         result = expr(s)
         if result:
@@ -933,7 +933,7 @@
                return None # no double unders
             start,end = result.span(1)
             st,e = result.span()
-            return (StructuredTextUnderline(s[start:end]),st,e)
+            return (StructuredTextUnderline(s[start:end]),st,e-1)
         else:
             return None