From 8419760fe168c8d14c1da550e14d6c43cc649c04 Mon Sep 17 00:00:00 2001 From: zyl Date: Thu, 7 Nov 2024 16:53:58 -0800 Subject: [PATCH] fix front matter bug --- src/frontmatter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontmatter.rs b/src/frontmatter.rs index b43307d..054fc1a 100644 --- a/src/frontmatter.rs +++ b/src/frontmatter.rs @@ -16,7 +16,7 @@ where /// Parses the given input for front matter. pub fn parse(input: String) -> eyre::Result { if input.starts_with("---\n") { - if let Some((frontmatter, content)) = input[3..].split_once("---\n") { + if let Some((frontmatter, content)) = input[3..].split_once("\n---\n") { let data = serde_yml::from_str(frontmatter)?; return Ok(Self { content: content.to_string(),