1
0
mirror of https://github.com/golang/go synced 2024-11-25 06:47:56 -07:00
go/lib/godoc
Robert Griesemer d916cca327 go/printer: remove notion of "Styler", remove HTML mode
Neither gofmt nor godoc are making use of a Styler (for
token-specific formatting) anymore. Stylers interacted in complicated
ways with HTML-escaping which was why the printer needed an HTML mode
in the first place.

godoc now uses a more powerful and general text formatting
function that does HTML escaping, text selection, and can
handle token-specific formatting if so desired (currently
used only for comments).

As a consequence, cleaned up uses of go/printer in godoc;
simplified the various write utility functions, and also
removed the need for the "html" template format (in favor of
html-esc which now does the same and is used more pervasively).

Applied gofmt -w src misc to verify no changes occured,
and tested godoc manually.

There should be no visible changes except that (type) code
snippets presented for godoc package documentation now
uses the same formatting as for general source code and
thus comments get the comment-specific color here as well
(not the case at the moment).

(TODO: godoc needs a good automatic test suite).

R=rsc
CC=golang-dev
https://golang.org/cl/4152042
2011-02-09 09:52:32 -08:00
..
codewalk.html godoc: canonicalize codewalk paths 2010-06-30 17:56:51 +10:00
codewalkdir.html godoc: add codewalk support 2010-04-26 22:35:12 -07:00
dirlist.html godoc: show relative file names without leading '/' (per r's request) 2010-03-24 16:28:59 -07:00
error.html godoc support for directories outside $GOROOT 2010-02-16 11:20:55 -08:00
godoc.html godoc: add separators between quick reference topics 2010-12-03 14:37:55 +11:00
package.html go/printer: remove notion of "Styler", remove HTML mode 2011-02-09 09:52:32 -08:00
package.txt The Dec 06 change 2011-01-04 13:16:29 -08:00
search.html godoc: enable fulltext index by default 2011-01-19 14:33:05 -08:00
search.txt godoc: support for regular expression full text search 2011-01-10 15:34:29 -08:00