From 335dd15e6ddb02e1b0649e1aefc5b2d7a02c3a82 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 0043cdd0..b84528ff 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 + '}')) } }; } }