markdown-it

github crates.io docs.rs build status coverage

Rust port of popular markdown-it.js library.

TL;DR: - if you want to get result fast, use pulldown-cmark - if you want to render GFM exactly like github, use comrak - if you want to define your own syntax (like @mentions, :emoji:, custom html classes), use this library

Features

You can probably parse AsciiDoc, reStructuredText or any other plain text format with this without too much effort <-- I might actually write these as proof-of-concept.

Usage

```rust let parser = &mut markdownit::MarkdownIt::new(); markdownit::plugins::cmark::add(parser); markdown_it::plugins::extra::add(parser);

let ast = parser.parse("Hello world!"); let html = ast.render();

print!("{html}"); // prints "

Hello world!

" ```

For a guide on how to extend it, see examples folder.