Commit 4f340f50 authored by Andrew Gerrand's avatar Andrew Gerrand

godoc: canonicalize codewalk paths

R=rsc
CC=golang-dev
https://golang.org/cl/1729046
parent 71675c6f
......@@ -15,7 +15,7 @@
<div id="code-area">
<div id="code-header" align="center">
<a id="code-popout-link" href="" target="_blank">
<img title="View code in new window" alt="Pop Out Code" src="popout.png" style="display: block; float: right;"/>
<img title="View code in new window" alt="Pop Out Code" src="/doc/codewalk/popout.png" style="display: block; float: right;"/>
</a>
<select id="code-selector">
{.repeated section File}
......
......@@ -63,6 +63,11 @@ func codewalk(c *http.Conn, r *http.Request) {
return
}
// Canonicalize the path and redirect if changed
if redirect(c, r) {
return
}
b := applyTemplate(codewalkHTML, "codewalk", cw)
servePage(c, "Codewalk: "+cw.Title, "", "", b)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment