[Python-checkins] python/dist/src/Lib textwrap.py,1.25,1.26
gward@users.sourceforge.net
gward@users.sourceforge.net
Tue, 06 May 2003 18:21:01 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv28249
Modified Files:
textwrap.py
Log Message:
SF #596434: tweak wordsep_re so the definition of an em-dash is
stricter: specifically, "--" must be preceded by a limited set of
characters, not by any non-whitespace character.
Index: textwrap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/textwrap.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** textwrap.py 7 May 2003 00:55:35 -0000 1.25
--- textwrap.py 7 May 2003 01:20:58 -0000 1.26
***************
*** 76,80 ****
wordsep_re = re.compile(r'(\s+|' # any whitespace
r'-*\w{2,}-(?=\w{2,})|' # hyphenated words
! r'(?<=\S)-{2,}(?=\w))') # em-dash
# XXX will there be a locale-or-charset-aware version of
--- 76,80 ----
wordsep_re = re.compile(r'(\s+|' # any whitespace
r'-*\w{2,}-(?=\w{2,})|' # hyphenated words
! r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash
# XXX will there be a locale-or-charset-aware version of