From 0c116643db4047f5af74bdc2b8dbc0630089d504 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 29 Aug 2022 09:26:42 +0000 Subject: [PATCH] www: provide text/help/#search anchor 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!; -- 2.44.0