diff options
author | Robert Griesemer <gri@golang.org> | 2009-11-08 23:34:08 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-11-08 23:34:08 -0800 |
commit | 7a3c85a34ef879cd6c5191721ebfeab51a94f398 (patch) | |
tree | 8aeaceb45a1d4bb3336a7869fe319896bf8b6890 /lib/godoc | |
parent | 2546155a816759168ca046ad8da001e93802b86f (diff) | |
download | golang-7a3c85a34ef879cd6c5191721ebfeab51a94f398.tar.gz |
Addressing issue brought up by dsymonds:
- When providing alternative spellings to a query, do not
prefix it with a package qualifier as the suggestion may
not have any results. Correctly filtering is quite a bit
of work, and clicking the alternative spelling will always
also show the qualified hits if they exist (but also others).
Seems good enough for now.
- Give user feedback when the query syntax was wrong.
- Package names in search results are now links to the respective
package documentation.
- Experimented with excluding main packages and test files
from index with inconclusive results. Code is present and
can be enabled by changing a flag in the source. This needs
some more work.
R=rsc
CC=r, dsymonds
http://go/go-review/1026033
Diffstat (limited to 'lib/godoc')
-rw-r--r-- | lib/godoc/search.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/godoc/search.html b/lib/godoc/search.html index 927910f65..e715df343 100644 --- a/lib/godoc/search.html +++ b/lib/godoc/search.html @@ -22,7 +22,7 @@ {.section Decls} <h2>Package-level declarations</h2> {.repeated section @} - <h3>package {Pak.Name|html}</h3> + <h3>package <a href="{Pak.Path|path}" class="noline">{Pak.Name|html}</a></h3> {.repeated section Files} {.repeated section Groups} {.repeated section Infos} @@ -36,7 +36,7 @@ {.section Others} <h2>Local declarations and uses</h2> {.repeated section @} - <h3>package {Pak.Name|html}</h3> + <h3>package <a href="{Pak.Path|path}" class="noline">{Pak.Name|html}</a></h3> {.repeated section Files} <a href="{File.Path|html}?h={Query|html}" class="noline">{File.Path|html}</a> <table class="layout"> @@ -56,7 +56,11 @@ {.end} {.end} {.end} -{.or} +{.end} +{.section Illegal} + <p> + <span class="alert" style="font-size:120%">Illegal query syntax</span> + </p> <p> A legal query is a single identifier (such as <a href="search?q=ToLower">ToLower</a>) or a qualified identifier (such as <a href="search?q=math.Sin">math.Sin</a>). |