Edited: Sunday 22 June 2025
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
adheres to Semantic Versioning,
and is generated by Changie.
Added ¶
- Support ordered lists for table of contents with ‘RenderOrderedList’.
Changed ¶
- goldmark: Raise minimum version to v1.7.8. This version of goldmark deprecates
Node.Text
.
Added ¶
- {Extender, Transformer}: Add TitleDepth field to change the level of the Table of Contents heading.
Changed ¶
Changed ¶
- Rename HeadingID option to TitleID. HeadingID is too generic.
Added ¶
- Add a HeadingID option to specify a custom ID for the Table of Contents heading.
Changed ¶
- Table of Contents heading now automatically gets an ID if the Parser was given an IDs generator.
Added ¶
- The new MinDepth option allows ignoring headings below the specified level.
Added ¶
- The new
Compact
option removes empty nodes in the TOC. If you have >1 level of difference between headings, this will render a cleaner TOC.
Added ¶
- Add a ListID attribute to Extender and Transformer.
If set, the rendered <ul>
will have an id
attribute with this value.
Added ¶
- Extender: Add Title field to change the Table of Contents title.
- Inspect: Add MaxDepth option to limit the depth of the Table of Contents.
Changed ¶
- Change the module path to
go.abhg.dev/goldmark/toc
.
Fixed ¶
- inspect: Correctly handle escaped punctuation in titles.
- render: Don’t unintentionally interpret escape sequences in titles.
Added ¶
- Add
toc.Transformer
to generate a table of contents to the front of any
document parsed by a Goldmark parser.
- Add
toc.Extender
to extend a goldmark.Markdown
object with the
transformer.