markdown-includes 0.1.1

Include other documents, table of content, or rust-doc in Markdown using a simple template system
Documentation
use std::path::Path;

use insta::assert_snapshot;

use crate::process_includes_document;

#[test]
fn test_toc() {
    let doc = r##"
Some markdown

```toml toc
header = "# Table of contents"
```

# My h1
text

## My h1.1
## My h1.2

# My h2
"##;

    let mut document = doc.trim().to_string();
    process_includes_document(&mut document, Path::new("")).unwrap();

    assert_snapshot!(document, @r###"
    Some markdown

    # Table of contents

    - [My h1](#my-h1)
        - [My h1.1](#my-h1.1)
        - [My h1.2](#my-h1.2)
    - [My h2](#my-h2)

    # My h1
    text

    ## My h1.1
    ## My h1.2

    # My h2
    "###);
}