[Python-checkins] python/dist/src/Lib textwrap.py,1.14,1.15

gward@users.sourceforge.net gward@users.sourceforge.net
Thu, 22 Aug 2002 14:28:02 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv29547

Modified Files:
	textwrap.py 
Log Message:
Tweak wordsep_re again: this time to recognize an em-dash with
any non-whitespace characters adjacent, not just \w.


Index: textwrap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/textwrap.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** textwrap.py	22 Aug 2002 21:04:21 -0000	1.14
--- textwrap.py	22 Aug 2002 21:28:00 -0000	1.15
***************
*** 57,61 ****
      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
--- 57,61 ----
      wordsep_re = re.compile(r'(\s+|'                  # any whitespace
                              r'-*\w{2,}-(?=\w{2,})|'   # hyphenated words
!                             r'(?<=\S)-{2,}(?=\S))')   # em-dash
  
      # XXX will there be a locale-or-charset-aware version of