1# markdown-it
2
3This directory holds a fork of the unmaintained markdown-it-rust package.
4Markodown forks this package to make bug fixes to its core CommonMark
5implementation.
6
7Rust port of popular
8[markdown-it.js](https://github.com/markdown-it/markdown-it) library.
9
10### Features
11
12- 100% CommonMark compatibility
13- AST
14- Source maps (full support, not just on block tags like cmark)
15- Ability to write your own syntax of arbitrary complexity
16 - to prove this point, CommonMark syntax itself is written as a plugin
17
18### Usage
19
20```rust
21let parser = &mut markdown_it::MarkdownIt::new();
22markdown_it::plugins::cmark::add(parser);
23markdown_it::plugins::extra::add(parser);
24
25let ast = parser.parse("Hello **world**!");
26let html = ast.render();
27
28print!("{html}");
29// prints "<p>Hello <strong>world</strong>!</p>"
30```
31
32For a guide on how to extend it, see `examples` folder.