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</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>!;

Reply via email to