Skip to content

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

v0.6.0

12 Nov 10:49
Compare
Choose a tag to compare

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

27 Jan 21:57
Compare
Choose a tag to compare

Better handling of content "other than text" in headers. I.e links.

v0.5.1

23 Nov 13:55
Compare
Choose a tag to compare
  • Exposes link to formatting function
  • Adheres to platform EOL in tests
  • Security patch

v0.5.0

21 Nov 16:38
Compare
Choose a tag to compare
  • Code updated to use ES5 syntax for easier in-browser use
  • Updates the existing format option to render markdown by default
  • Removes support for forceFullToc option (potentially BREAKING)

For background see #41

v0.4.4

11 Apr 07:23
Compare
Choose a tag to compare

Adds an optional function for transforming the links created in the TOC.

v0.4.3

17 Aug 08:55
Compare
Choose a tag to compare

Fixes faulty parsing of certain [-chars (#35). Thanks to @GiridharanNarayanan for fixing.

v0.4.2

13 Aug 12:17
Compare
Choose a tag to compare

Adds the possibility to specify header and footer HTML to be injected into the TOC container.

v0.4.1

13 Aug 12:11
Compare
Choose a tag to compare

Rendering bug fixed. Thanks @GiridharanNarayanan

v0.4.0

30 Jun 21:22
Compare
Choose a tag to compare
  • 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

13 Jun 20:13
Compare
Choose a tag to compare

Security patches