From a3fba04fdd209fb1b85b12c639cc76e08872fe06 Mon Sep 17 00:00:00 2001 From: Waseem Daher Date: Tue, 18 Dec 2012 10:32:17 -0500 Subject: [PATCH] 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) --- bots/zephyr_mirror_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 316c1e8..e0d4af2 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -433,7 +433,7 @@ def send_unauthed_zephyr(zwrite_args, content): return send_zephyr(zwrite_args + ["-d"], content) 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)) for line in message["content"].split("\n"))