[TEM #1] - Rename method 'substitute_args_in_template' -> 'replace_args'

pull/3/head
sgoudham 3 years ago
parent d405808a9b
commit 9c32fabb50
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -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) {

@ -137,7 +137,7 @@ impl<'a> Link<'a> {
})
}
pub(crate) fn substitute_args_in_template<P: AsRef<Path>>(&self, base: P) -> Result<String> {
pub(crate) fn replace_args<P: AsRef<Path>>(&self, base: P) -> Result<String> {
match self.link_type {
LinkType::Escaped => Ok((&self.link_text[1..]).to_owned()),
LinkType::Template(ref pat) => {

Loading…
Cancel
Save