From 5401674797d35d8f95a37a62b2858a3673bf1261 Mon Sep 17 00:00:00 2001 From: gennyble Date: Wed, 18 Dec 2024 00:28:11 -0600 Subject: Stack overflow? Cat, help --- src/templated.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/templated.rs') 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 { + 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 }) -- cgit 1.4.1-3-g733a5