Ignore TOML front matter in addition to YAML (fixes #63).

This commit is contained in:
David Anson 2017-07-02 20:33:29 -07:00
parent 0e8cb8f0dd
commit 5bea80f5cd
9 changed files with 38 additions and 8 deletions

View file

@ -301,15 +301,13 @@ Some Markdown content begins with metadata; the default `RegExp` for this option
ignores common forms of "front matter". To match differently, specify a custom
`RegExp` or use the value `null` to disable the feature.
Note: Matches must occur at the start of the file.
Default:
The default value:
```js
/^---$[^]*?^---$(\r\n|\r|\n)/m
/^(---|\+\+\+)$[^]*?^\1$(\r\n|\r|\n)/m
```
Ignores:
Ignores [YAML](https://en.wikipedia.org/wiki/YAML) and [TOML](https://en.wikipedia.org/wiki/TOML) such as:
```text
---
@ -318,6 +316,8 @@ title: Title
---
```
Note: Matches must occur at the start of the file.
##### options.noInlineConfig
Type: `Boolean`