From ec85783b347a5256abdf8e1d7cf05a9ffeac63df Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 13 Sep 2017 19:46:45 -0600 Subject: [PATCH] Fix JSON parser for gray-matter. --- src/formats/frontmatter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 + '}')) } }; } }