[][src]Crate minimad

This crate provides a very simple markdown parser.

Its main motivation was to be the basis of the 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:

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("!"),
        ]
    }
);

Structs

Compound

a Compound is a part of a line with a consistent styling. It can be part of word, several words, some inline code, or even the whole line.

Line

a parsed line

Text

a text, that is just a collection of lines

Enums

LineStyle

The global style of a line

Constants

MAX_HEADER_DEPTH