1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//!# 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.
//!
//!```rust
//!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 😭.

mod error;
mod fs;
mod parser;

pub use error::{Error, ParseError};
pub use fs::{read_file, write_file};
pub use parser::{parse, parse_format, Format, Markdown, ParseResult};