Walks a Markdown document and emits a nested table of contents.
The existing libraries were either abandoned or pulled in a large dependency tree.
pip install md-tocfrom md_toc import mdToc
result = mdToc("example")
print(result)- No runtime dependencies outside the standard library.
- Tested on Python 3.9 and newer.
MIT