mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-02-07 22:34:20 +01:00
Support JSON front matter as used by the Hugo site generator (fixes #270).
This commit is contained in:
parent
47d82d6fd4
commit
bb157b2ce7
11 changed files with 60 additions and 7 deletions
|
|
@ -429,11 +429,12 @@ ignores common forms of "front matter". To match differently, specify a custom
|
|||
The default value:
|
||||
|
||||
```js
|
||||
/((^---\s*$[^]*?^---\s*$)|(^\+\+\+\s*$[^]*?^(\+\+\+|\.\.\.)\s*$))(\r\n|\r|\n|$)/m
|
||||
/((^---\s*$[^]*?^---\s*$)|(^\+\+\+\s*$[^]*?^(\+\+\+|\.\.\.)\s*$)|(^\{\s*$[^]*?^\}\s*$))(\r\n|\r|\n|$)/m
|
||||
```
|
||||
|
||||
Ignores [YAML](https://en.wikipedia.org/wiki/YAML) and
|
||||
[TOML](https://en.wikipedia.org/wiki/TOML) such as:
|
||||
Ignores [YAML](https://en.wikipedia.org/wiki/YAML),
|
||||
[TOML](https://en.wikipedia.org/wiki/TOML), and
|
||||
[JSON](https://en.wikipedia.org/wiki/JSON) front matter such as:
|
||||
|
||||
```text
|
||||
---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue