diff options
author | gennyble <gen@nyble.dev> | 2024-12-18 00:28:11 -0600 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2024-12-18 00:28:11 -0600 |
commit | 5401674797d35d8f95a37a62b2858a3673bf1261 (patch) | |
tree | 40afd6b72cacbe436013bfeba3d57d3d17eb632f /src/templated.rs | |
parent | 958aac71e9130b4f61e2e829dafe1b3ee16caa66 (diff) | |
download | awake-5401674797d35d8f95a37a62b2858a3673bf1261.tar.gz awake-5401674797d35d8f95a37a62b2858a3673bf1261.zip |
Diffstat (limited to 'src/templated.rs')
-rwxr-xr-x | src/templated.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/templated.rs b/src/templated.rs index c6daac8..4598ecc 100755 --- a/src/templated.rs +++ b/src/templated.rs @@ -10,6 +10,8 @@ impl FromStr for Templated { type Err = TemplateError; fn from_str(raw: &str) -> Result<Self, Self::Err> { + tracing::trace!("parsing Templated"); + let (front, content) = match raw.strip_prefix("---\n") { None => return Err(TemplateError::MissingFrontmatter), Some(no_start) => match no_start.split_once("\n---\n") { @@ -18,6 +20,8 @@ impl FromStr for Templated { }, }; + tracing::trace!("isolated frontmatter"); + Ok(Self { frontmatter: front.parse()?, content: content.to_owned(), @@ -51,7 +55,8 @@ impl FromStr for Frontmatter { Some(tup) => tup, }; - entries.push((key.trim().to_owned(), value.trim().to_owned())) + entries.push((key.trim().to_owned(), value.trim().to_owned())); + tracing::trace!("pushed frontmatter entry {} successfully", key.trim()); } Ok(Self { entries }) |