summaryrefslogtreecommitdiff
path: root/lib/godoc/package.html
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2013-03-23 11:28:53 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-23 11:28:53 +0100
commitb39e15dde5ec7b96c15da9faf4ab5892501c1aae (patch)
tree718cede1f6ca97d082c6c40b7dc3f4f6148253c0 /lib/godoc/package.html
parent04b08da9af0c450d645ab7389d1467308cfc2db8 (diff)
downloadgolang-upstream/1.1_hg20130323.tar.gz
Imported Upstream version 1.1~hg20130323upstream/1.1_hg20130323
Diffstat (limited to 'lib/godoc/package.html')
-rw-r--r--lib/godoc/package.html30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/godoc/package.html b/lib/godoc/package.html
index 1df1f9151..33c2c2791 100644
--- a/lib/godoc/package.html
+++ b/lib/godoc/package.html
@@ -10,7 +10,11 @@
correspond to Go identifiers).
-->
{{with .PDoc}}
- {{if not $.IsMain}}
+ {{if $.IsMain}}
+ {{/* command documentation */}}
+ {{comment_html .Doc}}
+ {{else}}
+ {{/* package documentation */}}
<div id="short-nav">
<dl>
<dd><code>import "{{html .ImportPath}}"</code></dd>
@@ -71,9 +75,9 @@
{{end}}
{{end}}
{{if $.Notes}}
- {{range $marker, $item := $.Notes}}
+ {{range $marker, $item := $.Notes}}
<dd><a href="#pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</a></dd>
- {{end}}
+ {{end}}
{{end}}
</dl>
</div><!-- #manual-nav -->
@@ -88,7 +92,7 @@
</dl>
</div>
{{end}}
-
+
{{with .Filenames}}
<h4>Package files</h4>
<p>
@@ -101,7 +105,7 @@
{{end}}
</div><!-- .expanded -->
</div><!-- #pkg-index -->
-
+
{{with .Consts}}
<h2 id="pkg-constants">Constants</h2>
{{range .}}
@@ -160,16 +164,16 @@
{{example_html $name $.Examples $.FSet}}
{{end}}
{{end}}
- {{else}} {{/* not a package; is a command */}}
- {{comment_html .Doc}}
{{end}}
{{with $.Notes}}
- {{range $marker, $content := .}}
- <h2 id="pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</h2>
- {{range .}}
- {{comment_html .}}
- {{end}}
+ {{range $marker, $content := .}}
+ <h2 id="pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</h2>
+ <ul>
+ {{range .}}
+ <li>{{html .Body}}</li>
+ {{end}}
+ </ul>
{{end}}
{{end}}
{{end}}
@@ -250,7 +254,7 @@ $(document).ready(function() {
var resize = function() {
code.height(0);
var h = code[0].scrollHeight;
- code.height(h+20); // minimize bouncing
+ code.height(h+20); // minimize bouncing.
code.closest('.input').height(h);
};
code.on('keydown', resize);