From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, T_RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BDD3A1F49F for ; Wed, 4 Mar 2015 20:52:14 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] view: fix linkification and quote-folding conflicts Date: Wed, 4 Mar 2015 20:52:14 +0000 Message-Id: <1425502334-707-1-git-send-email-e@80x24.org> List-Id: 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(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 3bb3853..3695bb2 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 { -- EW