]> Sergey Matveev's repositories - public-inbox.git/commitdiff
www_text: fix #nntp anchor for there's a single NNTP server
authorEric Wong <e@80x24.org>
Thu, 11 Aug 2022 15:47:30 +0000 (15:47 +0000)
committerEric Wong <e@80x24.org>
Thu, 11 Aug 2022 16:22:22 +0000 (16:22 +0000)
We use "Newsgroup" (singular) when there's only one NNTP
server address configured.

lib/PublicInbox/WwwText.pm

index c067369ea8afe40499820fcc8e9740e3300f711c..581a19f34c4d9f0787e8716476d616362fc86f01 100644 (file)
@@ -68,7 +68,7 @@ sub get_text {
        }
        $txt = '<pre>' . $l->linkify_2($txt) . '</pre>';
        $txt =~ s!\bPOP3\b!<a\nid=pop3>POP3</a>!;
-       $txt =~ s!\bNewsgroups\b!<a\nid=nntp>Newsgroups</a>!;
+       $txt =~ s!\b(Newsgroups?)\b!<a\nid=nntp>$1</a>!;
        $txt =~ s!\bIMAP\b!<a\nid=imap>IMAP</a>!;
        PublicInbox::WwwStream::html_oneshot($ctx, $code, \$txt);
 }