From c2cf793143aaefde5b12d3a6909c5097fda76228 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 4 Mar 2015 20:50:34 +0000 Subject: 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. --- lib/PublicInbox/View.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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 { -- cgit v1.2.3-24-ge0c7