mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-22 17:00:13 +01:00
Support front matter title property override for MD041/first-line-h1 (fixes #53).
This commit is contained in:
parent
4ae649c462
commit
942f0600d2
18 changed files with 131 additions and 12 deletions
7
test/front-matter-alt-title-no-h1.json
Normal file
7
test/front-matter-alt-title-no-h1.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD041": {
|
||||
"front_matter_title": "^\\s*alternate="
|
||||
}
|
||||
}
|
||||
4
test/front-matter-alt-title-no-h1.md
Normal file
4
test/front-matter-alt-title-no-h1.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
alternate="Welcome to Jekyll!"
|
||||
---
|
||||
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post).
|
||||
7
test/front-matter-empty-title-no-h1.json
Normal file
7
test/front-matter-empty-title-no-h1.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD041": {
|
||||
"front_matter_title": ""
|
||||
}
|
||||
}
|
||||
7
test/front-matter-empty-title-no-h1.md
Normal file
7
test/front-matter-empty-title-no-h1.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
layout: post
|
||||
title: "Welcome to Jekyll!"
|
||||
date: 2015-11-17 16:16:01 -0600
|
||||
categories: jekyll update
|
||||
---
|
||||
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post). {MD041}
|
||||
5
test/front-matter-no-title-h1.json
Normal file
5
test/front-matter-no-title-h1.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD041": true
|
||||
}
|
||||
9
test/front-matter-no-title-h1.md
Normal file
9
test/front-matter-no-title-h1.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
layout: post
|
||||
notitle: "Welcome to Jekyll!"
|
||||
date: 2015-11-17 16:16:01 -0600
|
||||
categories: jekyll update
|
||||
---
|
||||
# Top level header
|
||||
|
||||
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post).
|
||||
5
test/front-matter-no-title-no-h1.json
Normal file
5
test/front-matter-no-title-no-h1.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD041": true
|
||||
}
|
||||
7
test/front-matter-no-title-no-h1.md
Normal file
7
test/front-matter-no-title-no-h1.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
layout: post
|
||||
notitle: "Welcome to Jekyll!"
|
||||
date: 2015-11-17 16:16:01 -0600
|
||||
categories: jekyll update
|
||||
---
|
||||
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post). {MD041}
|
||||
5
test/front-matter-title-h1.json
Normal file
5
test/front-matter-title-h1.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD041": true
|
||||
}
|
||||
9
test/front-matter-title-h1.md
Normal file
9
test/front-matter-title-h1.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
layout: post
|
||||
title: "Welcome to Jekyll!"
|
||||
date: 2015-11-17 16:16:01 -0600
|
||||
categories: jekyll update
|
||||
---
|
||||
# Top level header
|
||||
|
||||
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post).
|
||||
5
test/front-matter-title-no-h1.json
Normal file
5
test/front-matter-title-no-h1.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD041": true
|
||||
}
|
||||
7
test/front-matter-title-no-h1.md
Normal file
7
test/front-matter-title-no-h1.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
layout: post
|
||||
title: "Welcome to Jekyll!"
|
||||
date: 2015-11-17 16:16:01 -0600
|
||||
categories: jekyll update
|
||||
---
|
||||
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post).
|
||||
Loading…
Add table
Add a link
Reference in a new issue