mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-24 01:40:13 +01:00
Add front_matter_title parameter to MD025/single-title/single-h1 (refs #169).
This commit is contained in:
parent
050cbbba82
commit
61d6311a3e
14 changed files with 124 additions and 32 deletions
|
|
@ -28,7 +28,7 @@
|
|||
},
|
||||
{
|
||||
"lineNumber": 4,
|
||||
"ruleNames": [ "MD025", "single-h1" ],
|
||||
"ruleNames": [ "MD025", "single-title", "single-h1" ],
|
||||
"ruleDescription": "Multiple top level headings in the same document",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md025",
|
||||
"errorDetail": null,
|
||||
|
|
|
|||
7
test/front-matter-alt-title-h1.json
Normal file
7
test/front-matter-alt-title-h1.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD025": {
|
||||
"front_matter_title": "^\\s*alternate="
|
||||
}
|
||||
}
|
||||
6
test/front-matter-alt-title-h1.md
Normal file
6
test/front-matter-alt-title-h1.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
alternate="Welcome to Jekyll!"
|
||||
---
|
||||
# Top level heading {MD025}
|
||||
|
||||
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post).
|
||||
|
|
@ -4,6 +4,6 @@ title: "Welcome to Jekyll!"
|
|||
date: 2015-11-17 16:16:01 -0600
|
||||
categories: jekyll update
|
||||
---
|
||||
# Top level heading
|
||||
# Top level heading {MD025}
|
||||
|
||||
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD025": {
|
||||
"front_matter_title": ""
|
||||
},
|
||||
"MD041": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD025": {
|
||||
"front_matter_title": ""
|
||||
},
|
||||
"MD041": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ tags:
|
|||
url: https://example.com
|
||||
excerpt: Hello World! Vestibulum imperdiet adipiscing arcu, quis aliquam dolor condimentum dapibus. Aliquam fermentum leo aliquet quam volutpat et molestie mauris mattis. Suspendisse semper consequat velit in suscipit.
|
||||
---
|
||||
# heading1
|
||||
# heading1 {MD025}
|
||||
|
||||
This is just a sample post.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue