parser: Accept JSON frontmatter without leading "{\n"

Accept JSON frontmatter without leading "{\n" so that one line
frontmatters such as `{"param":"paramvalue"}` no longer silently render
empty html.
This commit is contained in:
crasm
2016-12-20 08:54:52 -05:00
committed by Bjørn Erik Pedersen
parent 62efcdfed4
commit ede452d34e
3 changed files with 24 additions and 27 deletions

View File

@@ -21,7 +21,7 @@ Supported formats:
* **[TOML][]**, identified by '`+++`'.
* **[YAML][]**, identified by '`---`'.
* **[JSON][]**, a single JSON object which is surrounded by '`{`' and '`}`', each on their own line.
* **[JSON][]**, a single JSON object which is surrounded by '`{`' and '`}`', followed by a newline.
[TOML]: https://github.com/toml-lang/toml "Tom's Obvious, Minimal Language"
[YAML]: http://www.yaml.org/ "YAML Ain't Markup Language"