afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-07-11 10:58 am

[dw-free] linebreak quoted material in private messages at 80 characters

[commit: http://hg.dwscoalition.org/dw-free/rev/32d605f3a7b8]

http://bugs.dwscoalition.org/show_bug.cgi?id=611

Add linebreaks for quoted replies in PMs, so that there will be a ">" per
line, instead of per paragraph.

Patch by [staff profile] denise.

Files modified:
  • htdocs/inbox/compose.bml
--------------------------------------------------------------------------------
diff -r 2d8af4871606 -r 32d605f3a7b8 htdocs/inbox/compose.bml
--- a/htdocs/inbox/compose.bml	Sat Jul 11 10:40:16 2009 +0000
+++ b/htdocs/inbox/compose.bml	Sat Jul 11 10:51:10 2009 +0000
@@ -168,6 +168,7 @@ body<=
         $msg_subject = "Re: " . $msg_subject
             unless $msg_subject =~ /Re: /;
         $msg_body = $msg->body;
+        $msg_body =~ s/(.{70}[^\s]*)\s+/$1\n/g;
         $msg_body =~ s/(^.*)/\> $1/gm;
         $msg_body = "\n\n--- $reply_to wrote:\n" . $msg_body;
         $msg_parent .= LJ::html_hidden({
--------------------------------------------------------------------------------
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2009-07-11 10:59 am (UTC)(link)
OMG YAY. that's been annoying me for YEARS.