From d0fe56f4e98fa552c5e271713a815d2382e614f7 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 29 Sep 2024 10:11:35 +0200 Subject: feat(templates): Provide a consistent syntax for replacements All replacements now start with `lpm::` and thus provide a future way to extend them. This change also adds the ability to access the chapter name in a new section and the current data in a new chapter. --- src/constants.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/constants.rs (limited to 'src/constants.rs') diff --git a/src/constants.rs b/src/constants.rs new file mode 100644 index 0000000..2cdec2d --- /dev/null +++ b/src/constants.rs @@ -0,0 +1,5 @@ +pub const REPLACEMENT_CHAPTER: &str = "lpm::new_chapter_name"; + +pub const REPLACEMENT_CHAPTER_SECTION: &str = "lpm::current_chapter_name::title_case"; +pub const REPLACMENT_SECTION_TITLE: &str = "lpm::new_section_name"; +pub const DATE: &str = "lpm::current_date"; -- cgit 1.4.1