summaryrefslogtreecommitdiffstats
path: root/Lib/textwrap.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2002-08-22 21:28:00 (GMT)
committerGreg Ward <gward@python.net>2002-08-22 21:28:00 (GMT)
commite3bd104aa7d0f664914c1db9547db24ea86a7b48 (patch)
treef55a12c4117b1facae9b69e479646843b811abd8 /Lib/textwrap.py
parentc6edb3726833207887356e9ceedf7fbabf404f5c (diff)
downloadcpython-e3bd104aa7d0f664914c1db9547db24ea86a7b48.zip
cpython-e3bd104aa7d0f664914c1db9547db24ea86a7b48.tar.gz
cpython-e3bd104aa7d0f664914c1db9547db24ea86a7b48.tar.bz2
Tweak wordsep_re again: this time to recognize an em-dash with
any non-whitespace characters adjacent, not just \w.
Diffstat (limited to 'Lib/textwrap.py')
-rw-r--r--Lib/textwrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/textwrap.py b/Lib/textwrap.py
index 8b3a265..f5d1915 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?