Releases: cmaas/markdown-it-table-of-contents
v0.6.0
The TOC generator was rewritten, because the old on-the-fly generator couldn't deal with unexpected order of headings and double-indentations. It is now a three-step process:
- Gather all headings in a list.
- Turn that list into a nested tree.
- Generate HTML code based on the nested tree.
Although all tests pass, this release could introduce some breaking changes for you, if you relied on the old way of doing things. Check the test cases to get a better understanding how this plugin handles various cases.
- Added: Support for
markdown-it-attrs
(fixes #54) - Changed: Respects unexpected nesting order (fixes #55)
- Changed: Uses anchor targets from existing id attributes (for example, set by
markdown-it-attrs
ormarkdown-it-anchor
) - Changed: Now nests list correctly if there is a jump (for example: h2, h2, h4 -> h4 is now double-indented)
- Removed: unused tests
v0.5.2
Better handling of content "other than text" in headers. I.e links.
v0.5.1
- Exposes link to formatting function
- Adheres to platform EOL in tests
- Security patch
v0.5.0
v0.4.4
Adds an optional function for transforming the links created in the TOC.
v0.4.3
Fixes faulty parsing of certain [
-chars (#35). Thanks to @GiridharanNarayanan for fixing.
v0.4.2
Adds the possibility to specify header and footer HTML to be injected into the TOC container.
v0.4.1
Rendering bug fixed. Thanks @GiridharanNarayanan
v0.4.0
- Removes dependency on String.js for security reasons
- Removes dependency on Lodash.assign because not necessary
- Uses a new default slugifier that matches markdown-it-anchor >5.0.0
v0.3.6
Security patches