Crate markdown_parser[][src]

md-parser

This a crate that can parse a markdown file.

Especially when you have front matters in your markdown file, this would help you to parse them.

Front Matter

md-parser have 3 format for front matter, which can be confirmed in running time.

enum Format {
    JSON,
    YAML,
    TOML,
}

These formats are the most popular format for front matters, if you are not included, maybe you need to do parsing work by yourself 😭.

Structs

Markdown

Markdown it is a struct refer a true md file

Enums

Error
Format

format of format matters

ParseError

Functions

parse

parse data and guess the Format

parse_format

parse data to the given Format

read_file

read content from a md file and return parse result

write_file

write a Markdown struct into a file

Type Definitions

ParseResult