bracket 0.5.6

Fast and correct handlebars-compatible template engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use bracket::{
    parser::{Parser, ParserOptions},
    Result,
};

/// Demonstrates how to get a document tree of nodes.
fn main() -> Result<()> {
    let content = include_str!("files/document.md");
    let options = ParserOptions {
        file_name: String::from("document.md"),
        line_offset: 0,
        byte_offset: 0,
    };
    let mut parser = Parser::new(content, options);
    let doc = parser.parse()?;
    println!("{:#?}", doc);
    Ok(())
}