[go: up one dir, main page]

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*!
This crate provides a *very* simple markdown parser.

Its main motivation was to be the basis of the [termimad](https://github.com/Canop/termimad) lib, which displays static and dynamic markdown snippets on a terminal without mixing the skin with the code.

It can be used on its own:

```rust
use minimad::Compound;
use minimad::{Line, LineStyle};

assert_eq!(
    Line::from("## a header with some **bold**!"),
    Line {
        style: LineStyle::Header(2),
        compounds: vec![
            Compound::raw_str("a header with some "),
            Compound::raw_str("bold").bold(),
            Compound::raw_str("!"),
        ]
    }
);
```
*/

mod compound;
mod line;
mod line_parser;
mod text;

pub use compound::Compound;
pub use line::MAX_HEADER_DEPTH;
pub use line::{Line, LineStyle};
pub use text::Text;