cmark-gfm
Automatically generate and add an accurate table of contents to markdown files. See also the GitHub action: https://github.com/frnmst/md-toc-action
Lightweight Python bindings to GitHub Flavored Markdown (GFM) library, with special support for task lists.