From: Eric Wong Date: Wed, 4 Mar 2015 20:50:34 +0000 (+0000) Subject: view: fix linkification and quote-folding conflicts X-Git-Tag: v1.0.0~1082 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c2cf793143aaefde5b12d3a6909c5097fda76228;p=public-inbox.git view: fix linkification and quote-folding conflicts We can't add newlines to links, unfortunately, because quote-folding is line-based and (being regexp-based) needs to happen after linkification. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 3bb38537..3695bb2a 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -221,7 +221,9 @@ sub add_filename_line { my $LINK_RE = qr!\b((?:ftp|https?|nntp)://[@\w\+\&\?\.\%\;/#=-]+)!; sub linkify { - $_[0] =~ s!$LINK_RE!$1!g; + # no newlines added here since it'd break the splitting we do + # to fold quotes + $_[0] =~ s!$LINK_RE!$1!g; } sub add_text_body_short {