indentation_test/
indentation_test.rs

1use links_notation::parse_lino_to_links;
2
3fn main() {
4    // Example with 2 spaces
5    let two_spaces = "parent:\n  child1\n  child2";
6    // Example with 4 spaces
7    let four_spaces = "parent:\n    child1\n    child2";
8
9    println!("=== Two Spaces ===");
10    match parse_lino_to_links(two_spaces) {
11        Ok(links) => {
12            println!("Parsed {} links:", links.len());
13            for (i, link) in links.iter().enumerate() {
14                println!("  Link {}: {:?}", i, link);
15            }
16        }
17        Err(e) => println!("Error: {:?}", e),
18    }
19
20    println!("\n=== Four Spaces ===");
21    match parse_lino_to_links(four_spaces) {
22        Ok(links) => {
23            println!("Parsed {} links:", links.len());
24            for (i, link) in links.iter().enumerate() {
25                println!("  Link {}: {:?}", i, link);
26            }
27        }
28        Err(e) => println!("Error: {:?}", e),
29    }
30}