A few months ago I thought to myself: "Why not build a Table of Content generator in Rust?" and I did it and I've been using it ever since almost daily.

Just now I found out that it completely breaks when the markdown file contains a Rust derive in a code block.

Building this tiny tool taught me a lot about parsing text and I'm really glad I did it the hard way without using any markdown crates.

This bug is now fixed in version 2.2.0. crates.io/crates/mktoc

Update cli with

cargo install mktoc --force


With a "Run on save" third-party extension you can run mktoc on every save which is _awesome_.

See instructions at


Sign in to participate in the conversation

bullgit.party is a instance for everyone who is part of bullgit. 🎉