diff --git a/src/preprocess/links.rs b/src/preprocess/links.rs index a5b3d3ee..2eef9b38 100644 --- a/src/preprocess/links.rs +++ b/src/preprocess/links.rs @@ -22,14 +22,14 @@ pub fn replace_all>(s: &str, path: P) -> Result { Ok(replaced) } -#[derive(PartialOrd, PartialEq, Debug)] +#[derive(PartialOrd, PartialEq, Debug, Clone)] enum LinkType<'a> { Escaped, Include(PathBuf), Playpen(PathBuf, Vec<&'a str>), } -#[derive(PartialOrd, PartialEq, Debug)] +#[derive(PartialOrd, PartialEq, Debug, Clone)] struct Link<'a> { start_index: usize, end_index: usize, @@ -110,7 +110,7 @@ fn find_links(contents: &str) -> LinkIter { | # or \{\{\s* # link opening parens and whitespace \#([a-zA-Z0-9]+) # link type - \s* # separating whitespace + \s+ # separating whitespace ([a-zA-Z0-9\s_.\-:/\\]+) # link target path and space separated properties \s*\}\} # whitespace and link closing parens ").unwrap();