From 9febd36660f3f0e6532bee9b1af70673631c045a Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 17 Apr 2015 17:09:18 -0600 Subject: [PATCH] tools/godoc: Fix indentation in doc contents Mobile-friendly design overlooked indentation in table of contents for article table of contents; this change restores indentation. Change-Id: I9a3013497e1659ebfb657a8fb9374b8ad9b04b16 Reviewed-on: https://go-review.googlesource.com/11582 Reviewed-by: Andrew Gerrand --- godoc/static/godocs.js | 2 +- godoc/static/static.go | 50 +++++++++++++++++------------------------- godoc/static/style.css | 3 +++ 3 files changed, 24 insertions(+), 31 deletions(-) diff --git a/godoc/static/godocs.js b/godoc/static/godocs.js index f7dc7fa9..27d2699a 100644 --- a/godoc/static/godocs.js +++ b/godoc/static/godocs.js @@ -78,7 +78,7 @@ function generateTOC() { if ($(node).is('h2')) { item = $('
'); } else { // h3 - item = $('
'); + item = $('
'); } item.append(link); toc_items.push(item); diff --git a/godoc/static/static.go b/godoc/static/static.go index 4f5868fb..da23d74b 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -39,18 +39,6 @@ var Files = map[string]string{ results in the source and package views. This document provides a brief tour of these features.

-

- The current status of the analysis features is that of a technology - preview; there are many problems and user-interface difficulties - which will be addressed in due course. Some known problems are - mentioned in passing, accompanied by a warning triangle, . - - Nonetheless, godoc's static analysis may be immediately useful today - for small-to-medium sized Go corpora, and it contains several - advances over the state of the art in code browsing. -

Type analysis features

@@ -71,10 +59,6 @@ var Files = map[string]string{ displays the error message.


-

- The mark-up for compilation errors may - cause duplication of portions of the input. -

Identifier resolution

@@ -135,8 +119,8 @@ var Files = map[string]string{ channel.

- Pointer analysis is slower than type analysis, taking an additional - 15 seconds or so for the standard libraries and their tests. + Compared to type analysis, pointer analysis requires more time and + memory, and is impractical for code bases exceeding a million lines.

Call graph navigation

@@ -270,21 +254,24 @@ var Files = map[string]string{

Known issues

- All analysis results pertain to exactly + All analysis results pertain to exactly one configuration (e.g. amd64 linux). Files that are conditionally compiled based on different platforms or build tags are not visible - to the analysis.
- - Files that import "C" require + to the analysis. +

+

+ Files that import "C" require preprocessing by the cgo tool. The file offsets after preprocessing - do not align with the unpreprocessed file, so markup is misaligned.
- - Files are not periodically re-analyzed. + do not align with the unpreprocessed file, so markup is misaligned. +

+

+ Files are not periodically re-analyzed. If the files change underneath the running server, the displayed - markup is misaligned.
- - Additional issues are listed at - tools/godoc/analysis/README.
+ markup is misaligned. +

+

+ Additional issues are listed at + tools/godoc/analysis/README.

`, @@ -656,7 +643,7 @@ function generateTOC() { if ($(node).is('h2')) { item = $('
'); } else { // h3 - item = $('
'); + item = $('
'); } item.append(link); toc_items.push(item); @@ -2830,6 +2817,9 @@ dl { dd { margin: 0; } +dd.indent { + margin: 0 20px; +} dl, dd { font-size: 14px; diff --git a/godoc/static/style.css b/godoc/static/style.css index 8430d830..3ea4a11f 100644 --- a/godoc/static/style.css +++ b/godoc/static/style.css @@ -106,6 +106,9 @@ dl { dd { margin: 0; } +dd.indent { + margin: 0 20px; +} dl, dd { font-size: 14px;