fix frontmatter parse flag

This commit is contained in:
2023-05-07 17:19:55 -07:00
parent b2de8df538
commit 715451f02f
2 changed files with 22 additions and 19 deletions

View File

@@ -20,7 +20,7 @@ export function process_frontmatter(raw_document: string, parse = true) {
const formatter_yaml = raw_document.slice(3, end_index);
const document = raw_document.slice(end_index + 4);
const frontmatter = parse ? formatter_yaml : yaml.parse(formatter_yaml);
const frontmatter = parse ? yaml.parse(formatter_yaml) : formatter_yaml;
return { frontmatter, document };
}