Don't consider hyphens to be an acceptable place to wordwrap.

Otherwise, URLs like this one from catherio:
  http://www.sadiemagazine.com/issue-no-11/arts-letters/comic/i-think-i-am-in-friend-love-with-you
don't go to zephyr as one line, which makes them really
annoying to click on barnowl, etc.

(imported from commit d14f0af7d24a6cb8bc7cb0582f60116308f59923)
This commit is contained in:
Waseem Daher 2012-12-18 10:32:17 -05:00 committed by Tim Abbott
parent 10f8eac0e5
commit a3fba04fdd

View file

@ -433,7 +433,7 @@ def send_unauthed_zephyr(zwrite_args, content):
return send_zephyr(zwrite_args + ["-d"], content) return send_zephyr(zwrite_args + ["-d"], content)
def forward_to_zephyr(message): def forward_to_zephyr(message):
wrapper = textwrap.TextWrapper(break_long_words=False) wrapper = textwrap.TextWrapper(break_long_words=False, break_on_hyphens=False)
wrapped_content = "\n".join("\n".join(wrapper.wrap(line)) wrapped_content = "\n".join("\n".join(wrapper.wrap(line))
for line in message["content"].split("\n")) for line in message["content"].split("\n"))