35 releases (11 breaking)

0.13.0 Aug 13, 2023
0.12.0 Mar 9, 2023
0.11.0 Mar 2, 2023
0.9.1 Sep 20, 2022
0.4.1 Jul 2, 2019

#305 in Parser implementations

Download history 7989/week @ 2024-01-06 13940/week @ 2024-01-13 11223/week @ 2024-01-20 9207/week @ 2024-01-27 11813/week @ 2024-02-03 11473/week @ 2024-02-10 10942/week @ 2024-02-17 11443/week @ 2024-02-24 11695/week @ 2024-03-02 12919/week @ 2024-03-09 13341/week @ 2024-03-16 13646/week @ 2024-03-23 11505/week @ 2024-03-30 11693/week @ 2024-04-06 14366/week @ 2024-04-13 9093/week @ 2024-04-20

48,427 downloads per month
Used in 81 crates (4 directly)

MIT license

97KB
2.5K SLoC

MIT Latest Version docs Chat on Miaou

A simple, non universal purpose, markdown parser.

If you're looking for a Markdown parser, this one is probably not the one you want:

Minimad can be used on its own but is first designed for the termimad lib, which displays static and dynamic markdown snippets on a terminal without mixing the skin with the code. Minimad sports a line-oriented flat structure (i.e. not a tree) which might not suit your needs.

If you still think you might use Minimad directly (not through Temimad), you may contact me on Miaou for advice.

Usage

[dependencies]
minimad = "0.7"
assert_eq!(
    Line::from("## a header with some **bold**!"),
    Line::new_header(
        2,
        vec![
            Compound::raw_str("a header with some "),
            Compound::raw_str("bold").bold(),
            Compound::raw_str("!"),
        ]
    )
);

assert_eq!(
    Line::from("Hello ~~wolrd~~ **World**. *Code*: `sqrt(π/2)`"),
    Line::new_paragraph(vec![
        Compound::raw_str("Hello "),
        Compound::raw_str("wolrd").strikeout(),
        Compound::raw_str(" "),
        Compound::raw_str("World").bold(),
        Compound::raw_str(". "),
        Compound::raw_str("Code").italic(),
        Compound::raw_str(": "),
        Compound::raw_str("sqrt(π/2)").code(),
    ])
);

Dependencies

~48KB