about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-29 09:26:42 +0000
committerEric Wong <e@80x24.org>2022-08-29 19:05:52 +0000
commit0c116643db4047f5af74bdc2b8dbc0630089d504 (patch)
treed6c3dfb659aaabe1030d41f5d9da4461677ec30c /lib/PublicInbox
parent6320f9f813443cdd14476f723deb022e2dfff9c4 (diff)
downloadpublic-inbox-0c116643db4047f5af74bdc2b8dbc0630089d504.tar.gz
This allows jumping to the appropriate section of the "help"
from under the dfblob textarea search.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/View.pm2
-rw-r--r--lib/PublicInbox/WwwText.pm1
2 files changed, 2 insertions, 1 deletions
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</a>:
 <textarea name=q cols=${\COLS} rows=$rows>$q</textarea>
 <input type=submit value=search
-/>\t(<a href=${upfx}_/text/help/>help</a>)</pre></form>
+/>\t(<a href=${upfx}_/text/help/#search>help</a>)</pre></form>
 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 = '<pre>' . $l->linkify_2($txt) . '</pre>';
+        $txt =~ s!^search$!<a\nid=search>search</a>!sm;
         $txt =~ s!\bPOP3\b!<a\nid=pop3>POP3</a>!;
         $txt =~ s!\b(Newsgroups?)\b!<a\nid=nntp>$1</a>!;
         $txt =~ s!\bIMAP\b!<a\nid=imap>IMAP</a>!;