commit | df7a615b2a3aca2f00259ef81b659e13db950cd3 | [log] [tgz] |
---|---|---|
author | Jamal Carvalho <jamal@golang.org> | Wed Apr 14 12:55:17 2021 -0400 |
committer | Jamal Carvalho <jamal@golang.org> | Wed Apr 14 17:53:15 2021 +0000 |
tree | 0234f288dc7d8d7eb40edad060245d335e674172 | |
parent | 12c70eaa040067ea9d95da2e43c5d8173d34d575 [diff] |
internal/frontend: extract nested table of contents from markdown The processReadme function now returns a nested table of contents extracted from the readme file based on the hierarchy of headings in the document. If the document has only a single top level heading and that heading has children it is assumed to be a title and removed from the table of contents. For golang/go#43325 Change-Id: I5b67a7e356820477851e6c34493e2517f889b02f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309393 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com>
Pkg.go.dev is a website for discovering and evaluating Go packages and modules.
You can check it out at https://pkg.go.dev.
If you want to report a bug or have a feature suggestion, please first check the known issues to see if your issue is already being discussed. If an issue does not already exist, feel free to file an issue.
For answers to frequently asked questions, see go.dev/about.
You can also chat with us on the #pkgsite Slack channel on the Gophers Slack.
We would love your help!
Our canonical Git repository is located at go.googlesource.com/pkgsite. There is a mirror of the repository at github.com/golang/pkgsite.
To contribute, please read our contributing guide.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.