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 😭.

Re-exports

pub use adapt::Adapter;
pub use adapt::AdapterObject;
pub use adapt::CommonObject;
pub use adapt::EmptyObject;
pub use adapt::SafeObject;

Modules

adapt

enable feature adapt to use this module

Structs

JsonAdapter

JsonAdapter

Markdown

Markdown it is a struct refer a true md file

TomlAdapter

TomlAdapter

YamlAdapter

YamlAdapter

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

MarkdownResult