diff --git a/js/frontmatter.js b/js/frontmatter.js index 8a7c643..de50486 100644 --- a/js/frontmatter.js +++ b/js/frontmatter.js @@ -39,6 +39,7 @@ export function parseFrontmatter(raw) { const meta = {}; let arrayKey = null; for (const line of match[1].split(/\r?\n/)) { + if (!line.trim()) continue; // blank line — doesn't close a block array const item = line.match(/^\s*-\s+(.*)$/); if (item && arrayKey) { meta[arrayKey].push(parseScalar(item[1])); continue; } const field = line.match(/^([A-Za-z][A-Za-z0-9_-]*):(?:\s*(.*))?$/);