mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-09 18:16:40 -07:00
fix front matter bug
This commit is contained in:
parent
790f25b829
commit
8419760fe1
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ where
|
|||
/// Parses the given input for front matter.
|
||||
pub fn parse(input: String) -> eyre::Result<Self> {
|
||||
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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue