diff --git a/src/formats/frontmatter.js b/src/formats/frontmatter.js index 0043cdd05188..b84528ff96ef 100644 --- a/src/formats/frontmatter.js +++ b/src/formats/frontmatter.js @@ -10,7 +10,7 @@ function inferFrontmatterFormat(str) { case "+++": return { language: "toml", delimiters: "+++", engines: { toml: tomlEng.parse.bind(tomlEng) } }; case "{": - return { language: "json", delimiters: ["{", "}"] }; + return { language: "json", delimiters: ["{", "}"], engines: { json: ((input) => matter.engines.json.parse('{' + input + '}')) } }; } }