Commit e3bd104a authored by Greg Ward's avatar Greg Ward

Tweak wordsep_re again: this time to recognize an em-dash with

any non-whitespace characters adjacent, not just \w.
parent c6edb372
......@@ -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?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment