minimad 0.3.3

light Markdown parser
Documentation

MIT Latest Version docs Chat on Miaou

A very simple, non universal purpose, dependency free 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.

Usage

[dependencies]
minimad = "0.3"
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!(
    parse_inline("*Italic then **bold and italic `and some *code*`** and italic*"),
    Composite::from(vec![
        Compound::raw_str("Italic then ").italic(),
        Compound::raw_str("bold and italic ").bold().italic(),
        Compound::raw_str("and some *code*").bold().italic().code(),
        Compound::raw_str(" and italic").italic(),
    ])
);