-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Milestone
Description
Presently, the best practice when enumerating something in godoc is to use a pre-formatted section. For example: """ This library has the following caveats: * It requires the caller to invoke the method only on odd-numbered days * It may crash your computer. """ I think it would improve godoc (HTML) readability to recognize and format bulleted lists as <ul>'s instead. The recognition could be narrowly defined to avoid mistakenly formatting blocks that were not intended to be lists. I propose a list is recognized as: - An indented (pre-formatted) block, - .. that consists of 2 or more list items - .. and that consists only of list items and a list item is defined as: - Consecutive lines - .. where the first line begins with "- " or "* " - .. that terminate on blank lines. This can be implemented with minimal disruption to the existing code. Here is a CL: https://golang.org/cl/91830044 Here are some before/after examples from popular package docs: http://godoc.org/code.google.com/p/gorilla/mux http://192.241.149.161:8080/pkg/code.google.com/p/gorilla/mux http://godoc.org/code.google.com/p/gorilla/sessions http://192.241.149.161:8080/pkg/code.google.com/p/gorilla/sessions http://godoc.org/code.google.com/p/gorilla/schema http://192.241.149.161:8080/pkg/code.google.com/p/gorilla/schema http://godoc.org/code.google.com/p/gogoprotobuf/gogoproto http://192.241.149.161:8080/pkg/code.google.com/p/gogoprotobuf/gogoproto http://godoc.org/github.com/davecgh/go-spew/spew http://192.241.149.161:8080/pkg/github.com/davecgh/go-spew/spew http://godoc.org/code.google.com/p/go.text/collate/colltab#pkg-constants http://192.241.149.161:8080/pkg/code.google.com/p/go.text/collate/colltab#pkg-constants
WillSewell, kostya-sh, csstaub, bronger, chewxy and 60 more