#[macro_use] extern crate lazy_static; mod walker; pub use walker::{vault_contents, WalkOptions}; use pathdiff::diff_paths; use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS}; use pulldown_cmark::{CodeBlockKind, CowStr, Event, Options, Parser, Tag}; use pulldown_cmark_to_cmark::cmark_with_options; use rayon::prelude::*; use regex::Regex; use slug::slugify; use snafu::{ResultExt, Snafu}; use std::ffi::OsString; use std::fmt; use std::fs::{self, File}; use std::io::prelude::*; use std::io::ErrorKind; use std::path::{Path, PathBuf}; use std::str; type Result = std::result::Result; type MarkdownTree<'a> = Vec>; lazy_static! { static ref OBSIDIAN_NOTE_LINK_RE: Regex = Regex::new(r"^(?P[^#|]+)(#(?P
.+?))??(\|(?P