Skip to content

Tags: cmaas/markdown-it-table-of-contents

Tags

v0.6.0

Toggle v0.6.0's commit message
0.6.0 Rewrite of TOC generator

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:

1. Gather all headings in a list.
2. Turn that list into a nested tree.
3. 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` or `markdown-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

Toggle v0.5.2's commit message
Maintainer wanted

v0.5.0

Toggle v0.5.0's commit message
fixes #48

v0.4.4

Toggle v0.4.4's commit message
0.4.4

v0.4.3

Toggle v0.4.3's commit message
0.4.3

v0.4.2

Toggle v0.4.2's commit message
0.4.2

v0.4.1

Toggle v0.4.1's commit message
0.4.1

v0.4.0

Toggle v0.4.0's commit message
Updates README

v0.3.6

Toggle v0.3.6's commit message
0.3.6