diff --git a/src/lib.rs b/src/lib.rs index e6ced57..c2b7e2a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -64,7 +64,7 @@ where for link in links::extract_template_links(chapter_content) { replaced.push_str(&chapter_content[previous_end_index..link.start_index]); - match link.substitute_args_in_template(&path) { + match link.replace_args(&path) { Ok(new_content) => { if depth < MAX_LINK_NESTED_DEPTH { if let Some(rel_path) = link.link_type.relative_path(path) { diff --git a/src/links.rs b/src/links.rs index 72599f2..85e7eae 100644 --- a/src/links.rs +++ b/src/links.rs @@ -137,7 +137,7 @@ impl<'a> Link<'a> { }) } - pub(crate) fn substitute_args_in_template>(&self, base: P) -> Result { + pub(crate) fn replace_args>(&self, base: P) -> Result { match self.link_type { LinkType::Escaped => Ok((&self.link_text[1..]).to_owned()), LinkType::Template(ref pat) => {