From e3bd104aa7d0f664914c1db9547db24ea86a7b48 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 22 Aug 2002 21:28:00 +0000 Subject: [PATCH] Tweak wordsep_re again: this time to recognize an em-dash with any non-whitespace characters adjacent, not just \w. --- Lib/textwrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/textwrap.py b/Lib/textwrap.py index 8b3a26559a..f5d1915711 100644 --- a/Lib/textwrap.py +++ b/Lib/textwrap.py @@ -56,7 +56,7 @@ class TextWrapper: # (after stripping out empty strings). wordsep_re = re.compile(r'(\s+|' # any whitespace r'-*\w{2,}-(?=\w{2,})|' # hyphenated words - r'(?<=\w)-{2,}(?=\w))') # em-dash + r'(?<=\S)-{2,}(?=\S))') # em-dash # XXX will there be a locale-or-charset-aware version of # string.lowercase in 2.3? -- 2.40.0