mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-30 20:48:48 +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
6
test/front-matter-alt-title-json.json
Normal file
6
test/front-matter-alt-title-json.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD041": {
|
||||
"front_matter_title": "^\\s*\"alternate\"\\s*:"
|
||||
}
|
||||
}
|
||||
6
test/front-matter-alt-title-json.md
Normal file
6
test/front-matter-alt-title-json.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"date": "2017-01-26T22:17:00+02:00",
|
||||
"alternate": "My document title and heading"
|
||||
}
|
||||
|
||||
Some plain text here.
|
||||
4
test/front-matter-title-json-spaces.json
Normal file
4
test/front-matter-title-json-spaces.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD041": true
|
||||
}
|
||||
6
test/front-matter-title-json-spaces.md
Normal file
6
test/front-matter-title-json-spaces.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"date": "2017-01-26T22:17:00+02:00",
|
||||
"title": "My document title and heading"
|
||||
}
|
||||
|
||||
Some plain text here.
|
||||
4
test/front-matter-title-json.json
Normal file
4
test/front-matter-title-json.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD041": true
|
||||
}
|
||||
6
test/front-matter-title-json.md
Normal file
6
test/front-matter-title-json.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"date": "2017-01-26T22:17:00+02:00",
|
||||
"title": "My document title and heading"
|
||||
}
|
||||
|
||||
Some plain text here.
|
||||
4
test/hugo-quickstart-example-json.json
Normal file
4
test/hugo-quickstart-example-json.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD041": true
|
||||
}
|
||||
13
test/hugo-quickstart-example-json.md
Normal file
13
test/hugo-quickstart-example-json.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"title": "Another Hugo Post",
|
||||
"description": "Nothing special, but one post is boring.",
|
||||
"date": "2014-09-02",
|
||||
"categories": [ "example", "configuration" ],
|
||||
"tags": [
|
||||
"example",
|
||||
"hugo",
|
||||
"toml"
|
||||
],
|
||||
}
|
||||
|
||||
# Heading {MD025}
|
||||
Loading…
Add table
Add a link
Reference in a new issue