From 9c32fabb50a8ad9d2f2d2f9d08f039131302b683 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Mon, 2 May 2022 03:12:08 +0100 Subject: [PATCH] [TEM #1] - Rename method 'substitute_args_in_template' -> 'replace_args' --- src/lib.rs | 2 +- src/links.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) => {