36 releases

0.13.1 May 22, 2024
0.13.0 Aug 13, 2023
0.12.0 Mar 9, 2023
0.9.1 Sep 20, 2022
0.4.1 Jul 2, 2019

#102 in Parser implementations

Download history 11036/week @ 2024-09-18 13999/week @ 2024-09-25 13543/week @ 2024-10-02 12898/week @ 2024-10-09 11225/week @ 2024-10-16 12739/week @ 2024-10-23 13569/week @ 2024-10-30 16287/week @ 2024-11-06 15169/week @ 2024-11-13 12051/week @ 2024-11-20 11856/week @ 2024-11-27 13642/week @ 2024-12-04 13150/week @ 2024-12-11 9896/week @ 2024-12-18 4299/week @ 2024-12-25 7695/week @ 2025-01-01

37,648 downloads per month
Used in 96 crates (5 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

~46KB