[Zope-Checkins] CVS: Zope2 - DocumentClass.py:1.22.2.2
chrism@serenade.digicool.com
chrism@serenade.digicool.com
Mon, 25 Jun 2001 19:32:18 -0400
Update of /cvs-repository/Zope2/lib/python/StructuredText
In directory serenade:/home/chrism/sandboxes/Zope24Branch/lib/python/StructuredText
Modified Files:
Tag: Zope-2_4-branch
DocumentClass.py
Log Message:
Merge from trunk.
--- Updated File DocumentClass.py in package Zope2 --
--- DocumentClass.py 2001/06/25 20:28:28 1.22.2.1
+++ DocumentClass.py 2001/06/25 23:32:18 1.22.2.2
@@ -858,7 +858,7 @@
def doc_literal(
self, s,
- expr = re.compile(r"'([%s%s%s\s]+)'[%s]+" % (letters, digits, literal_punc, phrase_delimiters)).search):
+ expr = re.compile(r"(\W+|^)'([%s%s%s\s]+)'([%s]+|$)" % (letters, digits, literal_punc, phrase_delimiters)).search,):
# old expr... failed to cross newlines.
# expr=re.compile(
@@ -867,9 +867,9 @@
# r"'(?:\s|[,.;:!?]|$)" # close
# ).search):
- r=expr(s)
+ r=expr(s) #or expr2(s)
if r:
- start, end = r.span(1)
+ start, end = r.span(2)
return (StructuredTextLiteral(s[start:end]), start-1, end+1)
else:
return None