summary refs log tree commit diff stats
path: root/src/constants.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-09-29 10:11:35 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-09-29 10:11:35 +0200
commitd0fe56f4e98fa552c5e271713a815d2382e614f7 (patch)
tree5564085c201fdac129e96fa6036c3da0b1c11a0b /src/constants.rs
parentfeat(bundle): Support bundling a document into one TeX file (diff)
downloadlpm-d0fe56f4e98fa552c5e271713a815d2382e614f7.tar.gz
lpm-d0fe56f4e98fa552c5e271713a815d2382e614f7.zip
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.
Diffstat (limited to 'src/constants.rs')
-rw-r--r--src/constants.rs5
1 files changed, 5 insertions, 0 deletions
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";