diff options
author | Greg Ward <gward@python.net> | 2002-08-22 21:28:00 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2002-08-22 21:28:00 (GMT) |
commit | e3bd104aa7d0f664914c1db9547db24ea86a7b48 (patch) | |
tree | f55a12c4117b1facae9b69e479646843b811abd8 /Lib/textwrap.py | |
parent | c6edb3726833207887356e9ceedf7fbabf404f5c (diff) | |
download | cpython-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.py | 2 |
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? |