From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4DAC91F625 for ; Mon, 29 Aug 2022 09:26:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1661765209; bh=EqhoViT9i4CIuol+I2kyn+MUOiv0ZCoEbvTa5MHazu8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yM6zjunZAQpP8oMAvoJx4lFDiKEwMXPzj+zP3G2xdGqCuF9VDvdzK5zFOf2M47lMo IVT7KN117AA454Asi0ZeLpU8Kv0ki3bkj0LrvCDW1BAtHiCyth3TSJy5+hR08A2SZk flmyknhG96VkfZKIj5UmK5pw6Ncszw9/7/ywYfe4= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 13/18] www: provide text/help/#search anchor Date: Mon, 29 Aug 2022 09:26:42 +0000 Message-Id: <20220829092647.1512215-14-e@80x24.org> In-Reply-To: <20220829092647.1512215-1-e@80x24.org> References: <20220829092647.1512215-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This allows jumping to the appropriate section of the "help" from under the dfblob textarea search. --- lib/PublicInbox/View.pm | 2 +- lib/PublicInbox/WwwText.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 86f4a467..f29fff50 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -849,7 +849,7 @@ action=$upfx href=#t>this message: \t(help) +/>\t(help) EOM } if ($ctx->{ibx}->over) { diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm index 3f840c44..1a0bb07a 100644 --- a/lib/PublicInbox/WwwText.pm +++ b/lib/PublicInbox/WwwText.pm @@ -67,6 +67,7 @@ sub get_text { $txt = ascii_html($txt); } $txt = '
' . $l->linkify_2($txt) . '
'; + $txt =~ s!^search$!search!sm; $txt =~ s!\bPOP3\b!POP3!; $txt =~ s!\b(Newsgroups?)\b!$1!; $txt =~ s!\bIMAP\b!IMAP!;