See More

--- /home/quarl/pkg/python/Python-2.4/Lib/.backup/textwrap.py.~1~ 2004-06-02 18:59:40.000000000 -0700 +++ /home/quarl/pkg/python/Python-2.4/Lib/textwrap.py 2005-02-27 10:19:29.000000000 -0800 @@ -79,7 +79,7 @@ # Hello/ /there/ /--/ /you/ /goof-/ball,/ /use/ /the/ /-b/ /option! # (after stripping out empty strings). wordsep_re = re.compile(r'(\s+|' # any whitespace - r'[^\s\w]*\w{2,}-(?=\w{2,})|' # hyphenated words + r'[^\s\w]*\w+[a-zA-Z]-(?=\w+[a-zA-Z])|' # hyphenated words r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash # XXX this is not locale- or charset-aware -- string.lowercase --- /home/quarl/pkg/python/Python-2.4/Lib/test/.backup/test_textwrap.py.~1~ 2004-07-07 21:22:19.000000000 -0700 +++ /home/quarl/pkg/python/Python-2.4/Lib/test/test_textwrap.py 2005-02-27 10:20:02.000000000 -0800 @@ -165,6 +165,13 @@ ["this-is-a-useful-feature-for-reformatting-", "posts-from-tim-peters'ly"]) + text = ("Python 1.0.0 was released on 1994-01-26. Python 1.0.1 was\n" + "released on 1994-02-15.") + + self.check_wrap(text, 35, ['Python 1.0.0 was released on', + '1994-01-26. Python 1.0.1 was', + 'released on 1994-02-15.']) + def test_em_dash(self): # Test text with em-dashes text = "Em-dashes should be written -- thus."