]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: <pre> must not occur inside <p>
authorOlivier Duperray <duperray.olivier@gmail.com>
Wed, 7 Dec 2011 20:00:38 +0000 (15:00 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 7 Dec 2011 20:00:38 +0000 (15:00 -0500)
Fixes #2532

R=golang-dev, dr.volker.dobler, rsc
CC=golang-dev
https://golang.org/cl/5450115

lib/godoc/example.html
lib/godoc/package.html

index 7badbb6fad5931cb2b765176f7dd5229d3b2686a..7af943172b4a8ade74fc59c53bba647d26eaaabf 100644 (file)
@@ -5,10 +5,10 @@
        <div class="expanded">
                <p class="exampleHeading">▾ Example</p>
                <p>Code:</p>
-               <p class="code"><pre>{{.Code}}</pre></p>
+               <pre class="code">{{.Code}}</pre>
                {{if .Output}}
                <p>Output:</p>
-               <p class="output"><pre>{{html .Output}}</pre></p>
+               <pre class="output">{{html .Output}}</pre>
                {{end}}
        </div>
 </div>
index 1286f6eff41d22c2e5d4fab321125c25c69aba86..34ca3b629f8a8e0eb2699b73d49144ec1108f07f 100644 (file)
@@ -51,8 +51,8 @@
        {{comment_html .Doc}}
        {{if $.IsPkg}}
                {{with .Filenames}}
-                       <p>
                        <h4>Package files</h4>
+                       <p>
                        <span style="font-size:90%">
                        {{range .}}
                                <a href="/{{.|srcLink}}">{{.|filename|html}}</a>
@@ -88,7 +88,7 @@
                {{$tname_html := node_html .Type.Name $.FSet}}
                <h2 id="{{$tname_html}}">type <a href="/{{posLink_url .Decl $.FSet}}">{{$tname_html}}</a></h2>
                {{comment_html .Doc}}
-               <p><pre>{{node_html .Decl $.FSet}}</pre></p>
+               <pre>{{node_html .Decl $.FSet}}</pre>
                {{range .Consts}}
                        {{comment_html .Doc}}
                        <pre>{{node_html .Decl $.FSet}}</pre>