Skip to content

Commit

Permalink
Fix JSON parser for gray-matter.
Browse files Browse the repository at this point in the history
  • Loading branch information
tech4him1 committed Sep 14, 2017
1 parent 132fe63 commit ec85783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formats/frontmatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 + '}')) } };
}
}

Expand Down

0 comments on commit ec85783

Please sign in to comment.