mirror of
https://github.com/golang/go
synced 2024-11-13 16:50:23 -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}}
|
{{$src_html := srcLink .File.Path | html}}
|
||||||
{{range .Groups}}
|
{{range .Groups}}
|
||||||
{{range .}}
|
{{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 .}}
|
{{infoSnippet_html .}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<h3 id="Local_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3>
|
<h3 id="Local_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3>
|
||||||
{{range .Files}}
|
{{range .Files}}
|
||||||
{{$src_html := srcLink .File.Path | html}}
|
{{$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">
|
<table class="layout">
|
||||||
{{range .Groups}}
|
{{range .Groups}}
|
||||||
<tr>
|
<tr>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<td align="left" width="4"></td>
|
<td align="left" width="4"></td>
|
||||||
<td>
|
<td>
|
||||||
{{range .}}
|
{{range .}}
|
||||||
<a href="/{{$src_html}}?h={{$query_url}}#L{{infoLine .}}">{{infoLine .}}</a>
|
<a href="{{$src_html}}?h={{$query_url}}#L{{infoLine .}}">{{infoLine .}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -86,14 +86,14 @@
|
|||||||
{{$src_html := srcLink .Filename | html}}
|
{{$src_html := srcLink .Filename | html}}
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="top">
|
<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>
|
||||||
<td align="left" width="4"></td>
|
<td align="left" width="4"></td>
|
||||||
<th align="left" valign="top">{{len .Lines}}</th>
|
<th align="left" valign="top">{{len .Lines}}</th>
|
||||||
<td align="left" width="4"></td>
|
<td align="left" width="4"></td>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
{{range .Lines}}
|
{{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}}
|
{{end}}
|
||||||
{{if not $.Complete}}
|
{{if not $.Complete}}
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user