diff options
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 }) |