fix(Markdown) ignore front matter if not first line

This commit is contained in:
gh0sTedBuddy
2024-04-01 23:16:08 +01:00
parent 483411e4cf
commit 851e6f2ffd

View File

@@ -91,6 +91,13 @@ export default class MarkdownEngine {
return value;
}
if(content.substring(0,3) != '```') {
return {
metadata: {},
content
}
}
let lines = content.split('\n');
let isFrontMatter = false;
const variables = {};
@@ -129,7 +136,7 @@ export default class MarkdownEngine {
return {
metadata: variables,
content: lines.join("\n"),
content: lines.join("\n") || content,
};
}