31 releases

0.9.1 Sep 20, 2022
0.9.0 Oct 16, 2021
0.8.0 Jun 2, 2021
0.7.0 Feb 15, 2021
0.4.1 Jul 2, 2019

#440 in Parser implementations

Download history 3208/week @ 2022-06-11 3682/week @ 2022-06-18 8574/week @ 2022-06-25 9346/week @ 2022-07-02 8313/week @ 2022-07-09 7996/week @ 2022-07-16 11563/week @ 2022-07-23 9187/week @ 2022-07-30 10951/week @ 2022-08-06 12402/week @ 2022-08-13 14295/week @ 2022-08-20 10140/week @ 2022-08-27 8795/week @ 2022-09-03 9222/week @ 2022-09-10 8034/week @ 2022-09-17 9503/week @ 2022-09-24

36,406 downloads per month
Used in 4 crates

MIT license

87KB
2K 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

~49KB