pulldown-cmark-toc

Generate a table of contents from a Markdown document.

Getting started

Add the following dependency to your Cargo.toml.

toml [dependencies] pulldown-cmark-toc = "0.1"

Usage

```rust use pulldowncmarktoc::TableOfContents;

let text = r#"

Heading

Subheading

Subheading with code

"#;

let toc = TableOfContents::new(text); asserteq!( toc.tocmark(), r#"- Heading - Subheading - Subheading with code "# ); } ```

License

Licensed under either of

at your option.