Commit 9264ecd7 authored by Guido van Rossum's avatar Guido van Rossum

Quick fix for a new problem here -- using string.lowercase somehow caused

problems.
parent 0eaa9406
...@@ -77,12 +77,11 @@ class TextWrapper: ...@@ -77,12 +77,11 @@ class TextWrapper:
r'[^\s\w]*\w+[a-zA-Z]-(?=\w+[a-zA-Z])|' # hyphenated words r'[^\s\w]*\w+[a-zA-Z]-(?=\w+[a-zA-Z])|' # hyphenated words
r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash
# XXX this is not locale- or charset-aware -- string.lowercase # XXX this is not locale-aware
# is US-ASCII only (and therefore English-only) sentence_end_re = re.compile(r'[a-z]' # lowercase letter
sentence_end_re = re.compile(r'[%s]' # lowercase letter
r'[\.\!\?]' # sentence-ending punct. r'[\.\!\?]' # sentence-ending punct.
r'[\"\']?' # optional end-of-quote r'[\"\']?' # optional end-of-quote
% string.lowercase) )
def __init__(self, def __init__(self,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment