summary refs log tree commit diff stats
path: root/src/new/replacement.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/new/replacement.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/new/replacement.rs b/src/new/replacement.rs
index 6878e61..0e9f27f 100644
--- a/src/new/replacement.rs
+++ b/src/new/replacement.rs
@@ -4,7 +4,7 @@ use chrono::{Local, TimeDelta, TimeZone};
 use log::debug;
 
 use crate::constants::{
-    DATE, REPLACEMENT_CHAPTER, REPLACEMENT_CHAPTER_SECTION, REPLACMENT_SECTION_TITLE,
+    DATE, REPLACEMENT_CHAPTER, REPLACEMENT_CHAPTER_SECTION, REPLACEMENT_FIGURE, REPLACMENT_SECTION,
 };
 
 fn get_current_date() -> String {
@@ -36,7 +36,7 @@ fn get_current_date() -> String {
 pub fn untemplatize_section(input: &str, new_section_name: &str, new_chapter_name: &str) -> String {
     input
         .replace(REPLACEMENT_CHAPTER_SECTION, &new_chapter_name)
-        .replace(REPLACMENT_SECTION_TITLE, &new_section_name)
+        .replace(REPLACMENT_SECTION, &new_section_name)
         .replace(DATE, &get_current_date())
 }
 
@@ -45,3 +45,8 @@ pub fn untemplatize_chapter(input: &str, new_chapter_name: &str) -> String {
         .replace(REPLACEMENT_CHAPTER, &new_chapter_name)
         .replace(DATE, &get_current_date())
 }
+pub fn untemplatize_figure(input: &str, new_figure_name: &str) -> String {
+    input
+        .replace(REPLACEMENT_FIGURE, &new_figure_name)
+        .replace(DATE, &get_current_date())
+}