1use links_notation::{parse_lino, parse_lino_with_config, ParserConfig};
8
9fn main() {
10 let documents = [
11 "# a note about the document\ndeploy: staging\n",
12 "deploy: staging # only staging, for now\n",
13 "issue#1047: open\n",
14 "\"# not a comment\": still a reference\n",
15 "parent\n # what the child is for\n child\n",
16 ];
17
18 for document in documents {
19 match parse_lino(document) {
20 Ok(links) => println!("{document:?}\n parses as {links}"),
21 Err(error) => println!("{document:?}\n {error}"),
22 }
23 }
24
25 let config = ParserConfig::without_comments();
28 let document = "# a b\n";
29 match parse_lino_with_config(document, &config) {
30 Ok(links) => println!("\nwithout comments {document:?}\n parses as {links}"),
31 Err(error) => println!("\nwithout comments {document:?}\n {error}"),
32 }
33}