Serhiy Storchaka added the comment:
Current regex produces insane result.
$ ./python -c "import textwrap; print(textwrap.wrap('this-is-a-useful-feature',
width=1, break_long_words=False))"
['this-', 'is-a', '-useful-', 'feature']
Antoine's regex produces more correct result for this case: ['this-', 'is-',
'a-', 'useful-', 'feature']. But this is not totally correct, one-letter word
should not be separated. This can be easy fixed.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22687>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com