mirror of
https://github.com/golang/go
synced 2024-11-21 19:04:44 -07:00
lib/godoc: removing leading / from search links
srcLink includes the / now; adding another yields //, which means something else entirely in URLs. Fixes #3327. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5823060
This commit is contained in:
parent
ed77d6f04d
commit
b4e0aeac32
@ -38,7 +38,7 @@
|
||||
{{$src_html := srcLink .File.Path | html}}
|
||||
{{range .Groups}}
|
||||
{{range .}}
|
||||
<a href="/{{$src_html}}?h={{$query_url}}#L{{infoLine .}}">{{$src_html}}:{{infoLine .}}</a>
|
||||
<a href="{{$src_html}}?h={{$query_url}}#L{{infoLine .}}">{{$src_html}}:{{infoLine .}}</a>
|
||||
{{infoSnippet_html .}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
@ -52,7 +52,7 @@
|
||||
<h3 id="Local_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3>
|
||||
{{range .Files}}
|
||||
{{$src_html := srcLink .File.Path | html}}
|
||||
<a href="/{{$src_html}}?h={{$query_url}}">{{$src_html}}</a>
|
||||
<a href="{{$src_html}}?h={{$query_url}}">{{$src_html}}</a>
|
||||
<table class="layout">
|
||||
{{range .Groups}}
|
||||
<tr>
|
||||
@ -61,7 +61,7 @@
|
||||
<td align="left" width="4"></td>
|
||||
<td>
|
||||
{{range .}}
|
||||
<a href="/{{$src_html}}?h={{$query_url}}#L{{infoLine .}}">{{infoLine .}}</a>
|
||||
<a href="{{$src_html}}?h={{$query_url}}#L{{infoLine .}}">{{infoLine .}}</a>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
@ -86,14 +86,14 @@
|
||||
{{$src_html := srcLink .Filename | html}}
|
||||
<tr>
|
||||
<td align="left" valign="top">
|
||||
<a href="/{{$src_html}}?h={{$query_url}}">{{$src_html}}</a>:
|
||||
<a href="{{$src_html}}?h={{$query_url}}">{{$src_html}}</a>:
|
||||
</td>
|
||||
<td align="left" width="4"></td>
|
||||
<th align="left" valign="top">{{len .Lines}}</th>
|
||||
<td align="left" width="4"></td>
|
||||
<td align="left">
|
||||
{{range .Lines}}
|
||||
<a href="/{{$src_html}}?h={{$query_url}}#L{{html .}}">{{html .}}</a>
|
||||
<a href="{{$src_html}}?h={{$query_url}}#L{{html .}}">{{html .}}</a>
|
||||
{{end}}
|
||||
{{if not $.Complete}}
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user