├── .changes ├── header.tpl.md ├── unreleased │ └── .gitkeep ├── v0.1.0.md ├── v0.10.0.md ├── v0.11.0.md ├── v0.12.0.md ├── v0.2.0.md ├── v0.2.1.md ├── v0.3.0.md ├── v0.4.0.md ├── v0.5.0.md ├── v0.6.0.md ├── v0.7.0.md ├── v0.8.0.md └── v0.9.0.md ├── .changie.yaml ├── .github └── workflows │ ├── ci.yml │ └── doc.yml ├── .gitignore ├── .golangci.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── demo ├── Makefile ├── go.mod ├── go.sum ├── main.go └── static │ ├── .gitignore │ └── index.html ├── doc.go ├── example_test.go ├── extend.go ├── go.mod ├── go.sum ├── inspect.go ├── inspect_test.go ├── integration_test.go ├── mise.lock ├── mise.oldstable.toml ├── mise.toml ├── render.go ├── render_test.go ├── renovate.json ├── testdata ├── rapid │ ├── TestInspectCompactRandomHeadings │ │ └── TestInspectCompactRandomHeadings-20230911051733-28626.fail │ └── TestInspect_rapid │ │ └── TestInspect_rapid-20230911050748-19573.fail └── tests.yaml ├── toc.go ├── transform.go └── transform_test.go /.changes/header.tpl.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), 6 | and is generated by [Changie](https://github.com/miniscruff/changie). 7 | -------------------------------------------------------------------------------- /.changes/unreleased/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abhinav/goldmark-toc/e468a84b5e36546d43fdd62f5e31bb0feb3a2749/.changes/unreleased/.gitkeep -------------------------------------------------------------------------------- /.changes/v0.1.0.md: -------------------------------------------------------------------------------- 1 | ## v0.1.0 - 2021-03-23 2 | - Initial release. 3 | -------------------------------------------------------------------------------- /.changes/v0.10.0.md: -------------------------------------------------------------------------------- 1 | ## v0.10.0 - 2024-02-27 2 | ### Added 3 | - {Extender, Transformer}: Add TitleDepth field to change the level of the Table of Contents heading. 4 | ### Changed 5 | - Relicense to BSD3. 6 | -------------------------------------------------------------------------------- /.changes/v0.11.0.md: -------------------------------------------------------------------------------- 1 | ## v0.11.0 - 2025-02-02 2 | ### Changed 3 | - goldmark: Raise minimum version to v1.7.8. This version of goldmark deprecates `Node.Text`. 4 | -------------------------------------------------------------------------------- /.changes/v0.12.0.md: -------------------------------------------------------------------------------- 1 | ## v0.12.0 - 2025-05-11 2 | ### Added 3 | - Support ordered lists for table of contents with 'RenderOrderedList'. 4 | -------------------------------------------------------------------------------- /.changes/v0.2.0.md: -------------------------------------------------------------------------------- 1 | ## v0.2.0 - 2021-04-04 2 | ### Added 3 | - Add `toc.Transformer` to generate a table of contents to the front of any 4 | document parsed by a Goldmark parser. 5 | - Add `toc.Extender` to extend a `goldmark.Markdown` object with the 6 | transformer. 7 | -------------------------------------------------------------------------------- /.changes/v0.2.1.md: -------------------------------------------------------------------------------- 1 | ## v0.2.1 - 2021-12-15 2 | ### Fixed 3 | - inspect: Correctly handle escaped punctuation in titles. 4 | - render: Don't unintentionally interpret escape sequences in titles. 5 | -------------------------------------------------------------------------------- /.changes/v0.3.0.md: -------------------------------------------------------------------------------- 1 | ## v0.3.0 - 2022-12-19 2 | ### Changed 3 | - Change the module path to `go.abhg.dev/goldmark/toc`. 4 | -------------------------------------------------------------------------------- /.changes/v0.4.0.md: -------------------------------------------------------------------------------- 1 | ## v0.4.0 - 2023-03-02 2 | ### Added 3 | - Extender: Add Title field to change the Table of Contents title. 4 | - Inspect: Add MaxDepth option to limit the depth of the Table of Contents. 5 | -------------------------------------------------------------------------------- /.changes/v0.5.0.md: -------------------------------------------------------------------------------- 1 | ## v0.5.0 - 2023-09-02 2 | ### Added 3 | - Add a ListID attribute to Extender and Transformer. 4 | If set, the rendered `