Change "header" to "heading" across the library

This should be backward compatible, as all "header" aliases are still
available, though documented as discouraged for future use.
This commit is contained in:
Milos Levacic 2018-03-19 23:39:42 +01:00 committed by David Anson
parent e938f421a9
commit 45424cf459
148 changed files with 861 additions and 699 deletions

View file

@ -1,3 +0,0 @@
## A level 2 top level header
## Another one {MD025}

View file

@ -0,0 +1,3 @@
## A level 2 top level heading
## Another one {MD025}

View file

@ -1,17 +0,0 @@
#Header 1 {MD020} #
## Header 2 {MD020}##
##Header 3 {MD020}##
## Header 4 {MD021} ##
## Header 5 {MD021} ##
## Header 6 {MD021} ##
## Header 7 {MD021} ##
## Header 8 \#
## Header 9 \#

View file

@ -0,0 +1,17 @@
#Heading 1 {MD020} #
## Heading 2 {MD020}##
##Heading 3 {MD020}##
## Heading 4 {MD021} ##
## Heading 5 {MD021} ##
## Heading 6 {MD021} ##
## Heading 7 {MD021} ##
## Heading 8 \#
## Heading 9 \#

View file

@ -1,5 +0,0 @@
#Header 1 {MD018}
## Header 2 {MD019}
## Header 3 {MD019}

View file

@ -0,0 +1,5 @@
#Heading 1 {MD018}
## Heading 2 {MD019}
## Heading 3 {MD019}

View file

@ -2,9 +2,9 @@
"default": true,
"MD041": true,
"MD043": {
"headers": [
"## Header 1 {MD002} {MD041}",
"#### Header 2 {MD001}",
"headings": [
"## Heading 1 {MD002} {MD041}",
"#### Heading 2 {MD001}",
"# Broken"
]
},

View file

@ -1,8 +1,8 @@
## Header 1 {MD002} {MD041}
## Heading 1 {MD002} {MD041}
#### Header 2 {MD001}
#### Heading 2 {MD001}
# Header 3 {MD003} {MD043} #
# Heading 3 {MD003} {MD043} #
* list
+ list {MD004} {MD006} {MD007} {MD030}
@ -22,22 +22,22 @@ long line long line long line long line long line long line long line long line
$ dollar {MD014}
#Header 4 {MD018}
#Heading 4 {MD018}
# Header 5 {MD019}
# Heading 5 {MD019}
#Header 6 {MD020} #
# Header 7 {MD021} {MD022} {MD023} {MD003} #
#Heading 6 {MD020} #
# Heading 7 {MD021} {MD022} {MD023} {MD003} #
# Header 8
# Heading 8
# Header 8
# Heading 8
{MD024:34}
Note: Can not break MD025 and MD002 in the same file
# Header 9 {MD026}.
# Heading 9 {MD026}.
> {MD027}
@ -62,7 +62,7 @@ http://example.com/page {MD034}
{MD035:61}
_Section {MD036} Header_
_Section {MD036} Heading_
Emphasis *with * space {MD037}

View file

@ -1,3 +1,3 @@
# Header
# Heading
Text

View file

@ -1,4 +1,4 @@
# Header
# Heading
```js
@ -10,5 +10,5 @@
```
```spaces
```

View file

@ -1,4 +1,4 @@
# header
# heading
```fence
$ code

View file

@ -1,24 +1,24 @@
[
{
"lineNumber": 3,
"ruleNames": [ "MD001", "header-increment" ],
"ruleDescription": "Header levels should only increment by one level at a time",
"ruleNames": [ "MD001", "heading-increment", "header-increment" ],
"ruleDescription": "Heading levels should only increment by one level at a time",
"errorDetail": "Expected: h3; Actual: h4",
"errorContext": null,
"errorRange": null
},
{
"lineNumber": 1,
"ruleNames": [ "MD002", "first-header-h1" ],
"ruleDescription": "First header should be a top level header",
"ruleNames": [ "MD002", "first-heading-h1", "first-header-h1" ],
"ruleDescription": "First heading should be a top level heading",
"errorDetail": "Expected: h1; Actual: h2",
"errorContext": null,
"errorRange": null
},
{
"lineNumber": 5,
"ruleNames": [ "MD003", "header-style" ],
"ruleDescription": "Header style",
"ruleNames": [ "MD003", "heading-style", "header-style" ],
"ruleDescription": "Heading style",
"errorDetail": "Expected: atx; Actual: atx_closed",
"errorContext": null,
"errorRange": null

View file

@ -1,4 +1,4 @@
# Top level header
# Top level heading
<!-- markdownlint-disable MD003 -->

View file

@ -34,7 +34,7 @@
{
"lineNumber": 12,
"ruleNames": [ "MD018", "no-missing-space-atx" ],
"ruleDescription": "No space after hash on atx style header",
"ruleDescription": "No space after hash on atx style heading",
"errorDetail": null,
"errorContext": "##No space A",
"errorRange": [1, 3]
@ -42,7 +42,7 @@
{
"lineNumber": 14,
"ruleNames": [ "MD019", "no-multiple-space-atx" ],
"ruleDescription": "Multiple spaces after hash on atx style header",
"ruleDescription": "Multiple spaces after hash on atx style heading",
"errorDetail": null,
"errorContext": "## Multiple spaces B",
"errorRange": [1, 5]
@ -50,7 +50,7 @@
{
"lineNumber": 16,
"ruleNames": [ "MD020", "no-missing-space-closed-atx" ],
"ruleDescription": "No space inside hashes on closed atx style header",
"ruleDescription": "No space inside hashes on closed atx style heading",
"errorDetail": null,
"errorContext": "##No space C ##",
"errorRange": [1, 3]
@ -58,7 +58,7 @@
{
"lineNumber": 18,
"ruleNames": [ "MD020", "no-missing-space-closed-atx" ],
"ruleDescription": "No space inside hashes on closed atx style header",
"ruleDescription": "No space inside hashes on closed atx style heading",
"errorDetail": null,
"errorContext": "## No space D##",
"errorRange": [13, 3]
@ -66,7 +66,7 @@
{
"lineNumber": 20,
"ruleNames": [ "MD021", "no-multiple-space-closed-atx" ],
"ruleDescription": "Multiple spaces inside hashes on closed atx style header",
"ruleDescription": "Multiple spaces inside hashes on closed atx style heading",
"errorDetail": null,
"errorContext": "## Multiple spaces E ##",
"errorRange": [1, 5]
@ -74,7 +74,7 @@
{
"lineNumber": 22,
"ruleNames": [ "MD021", "no-multiple-space-closed-atx" ],
"ruleDescription": "Multiple spaces inside hashes on closed atx style header",
"ruleDescription": "Multiple spaces inside hashes on closed atx style heading",
"errorDetail": null,
"errorContext": "## Multiple spaces F ##",
"errorRange": [20, 5]

View file

@ -1,24 +1,24 @@
[
{
"lineNumber": 1,
"ruleNames": [ "MD022", "blanks-around-headers" ],
"ruleDescription": "Headers should be surrounded by blank lines",
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
"ruleDescription": "Headings should be surrounded by blank lines",
"errorDetail": null,
"errorContext": "# Heading",
"errorRange": null
},
{
"lineNumber": 1,
"ruleNames": [ "MD023", "header-start-left" ],
"ruleDescription": "Headers must start at the beginning of the line",
"ruleNames": [ "MD023", "heading-start-left", "header-start-left" ],
"ruleDescription": "Headings must start at the beginning of the line",
"errorDetail": null,
"errorContext": " # Heading",
"errorRange": [1, 2]
},
{
"lineNumber": 4,
"ruleNames": [ "MD024", "no-duplicate-header" ],
"ruleDescription": "Multiple headers with the same content",
"ruleNames": [ "MD024", "no-duplicate-heading", "no-duplicate-header" ],
"ruleDescription": "Multiple headings with the same content",
"errorDetail": null,
"errorContext": "# Heading",
"errorRange": null
@ -26,7 +26,7 @@
{
"lineNumber": 4,
"ruleNames": [ "MD025", "single-h1" ],
"ruleDescription": "Multiple top level headers in the same document",
"ruleDescription": "Multiple top level headings in the same document",
"errorDetail": null,
"errorContext": "# Heading",
"errorRange": null
@ -34,7 +34,7 @@
{
"lineNumber": 6,
"ruleNames": [ "MD026", "no-trailing-punctuation" ],
"ruleDescription": "Trailing punctuation in header",
"ruleDescription": "Trailing punctuation in heading",
"errorDetail": "Punctuation: '.'",
"errorContext": null,
"errorRange": [19, 1]

View file

@ -41,8 +41,8 @@
},
{
"lineNumber": 13,
"ruleNames": [ "MD036", "no-emphasis-as-header" ],
"ruleDescription": "Emphasis used instead of a header",
"ruleNames": [ "MD036", "no-emphasis-as-heading", "no-emphasis-as-header" ],
"ruleDescription": "Emphasis used instead of a heading",
"errorDetail": null,
"errorContext": "Emphasis",
"errorRange": null

View file

@ -2,8 +2,8 @@
"default": true,
"MD041": true,
"MD043": {
"headers": [
"# Header"
"headings": [
"# Heading"
]
},
"MD044": {

View file

@ -1,4 +1,4 @@
Not a header
Not a heading
An [empty]() link

View file

@ -2,9 +2,9 @@
{
"lineNumber": 1,
"ruleNames": [ "MD041", "first-line-h1" ],
"ruleDescription": "First line in file should be a top level header",
"ruleDescription": "First line in file should be a top level heading",
"errorDetail": null,
"errorContext": "Not a header",
"errorContext": "Not a heading",
"errorRange": null
},
{
@ -41,10 +41,10 @@
},
{
"lineNumber": 20,
"ruleNames": [ "MD043", "required-headers" ],
"ruleDescription": "Required header structure",
"ruleNames": [ "MD043", "required-headings", "required-headers" ],
"ruleDescription": "Required heading structure",
"errorDetail": null,
"errorContext": "# Header",
"errorContext": "# Heading",
"errorRange": null
},
{

View file

@ -10,7 +10,7 @@
{
"lineNumber": 4,
"ruleNames": [ "MD041", "first-line-h1" ],
"ruleDescription": "First line in file should be a top level header",
"ruleDescription": "First line in file should be a top level heading",
"errorDetail": null,
"errorContext": "Text",
"errorRange": null

View file

@ -35,6 +35,6 @@ This is another **normal** paragraph with some text in it. This also should
not trigger the rule.
**This is an entire paragraph that has been emphasized, and shouldn't be
detected as a header because it's on multiple lines**
detected as a heading because it's on multiple lines**
**This also shouldn't be detected as a header as it ends in punctuation.**
**This also shouldn't be detected as a heading as it ends in punctuation.**

View file

@ -1,4 +1,4 @@
# header
# heading
text
```fence {MD031}

View file

@ -1 +0,0 @@
## Header {MD002}

View file

@ -1,2 +0,0 @@
Header {MD002}
--------------

View file

@ -1 +0,0 @@
# Header

View file

@ -1,2 +0,0 @@
Header
======

View file

@ -0,0 +1 @@
## Heading {MD002}

View file

@ -0,0 +1,2 @@
Heading {MD002}
--------------

View file

@ -0,0 +1 @@
# Heading

View file

@ -0,0 +1,2 @@
Heading
=======

View file

@ -1,3 +0,0 @@
# First line is a top level header
This shouldn't trigger MD041

View file

@ -1,4 +0,0 @@
First line top level header
===========================
This shouldn't trigger MD041

View file

@ -0,0 +1,3 @@
# First line is a top level heading
This shouldn't trigger MD041

View file

@ -0,0 +1,4 @@
First line top level heading
============================
This shouldn't trigger MD041

View file

@ -1,6 +1,6 @@
+++
date = "2017-01-26T22:17:00+02:00"
alternate = "My document title and header"
alternate = "My document title and heading"
+++
Some plain text here.

View file

@ -1,5 +1,5 @@
---
---
# Header
# Heading
# Another {MD025}

View file

@ -4,6 +4,6 @@ notitle: "Welcome to Jekyll!"
date: 2015-11-17 16:16:01 -0600
categories: jekyll update
---
# Top level header
# Top level heading
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post).

View file

@ -4,6 +4,6 @@ title: "Welcome to Jekyll!"
date: 2015-11-17 16:16:01 -0600
categories: jekyll update
---
# Top level header
# Top level heading
Front matter from [Jekyll documentation](https://jekyllrb.com/docs/posts/#a-typical-post).

View file

@ -1,6 +1,6 @@
+++
date = "2017-01-26T22:17:00+02:00"
title = "My document title and header"
title = "My document title and heading"
+++
Some plain text here.

View file

@ -3,7 +3,7 @@ layout: post
title: Title with ---
tags: front matter
---
## Header {MD002}
## Heading {MD002}
---

View file

@ -1,6 +1,6 @@
---
front: matter
---
# Header 1
# Heading 1
## Header 2
## Heading 2

View file

@ -1,11 +0,0 @@
# Header 1
## Header 2
## Header 1
### Header 2
## Header 3
{MD024:5} {MD024:7}

View file

@ -1,7 +0,0 @@
# Header
### Header 3 {MD001}
## Header 2
#### Header 4 {MD001}

View file

@ -1,11 +0,0 @@
Header 1
========
Header 2
--------
## Header 2 {MD003}
### Header 3
#### Header 4 {MD003} ####

View file

@ -1,11 +0,0 @@
Header 1
========
Header 2
--------
## Header 2 {MD003} ##
### Header 3 ###
#### Header 4 {MD003}

View file

@ -1,12 +0,0 @@
# Header 1
## Header 2 {MD022}
Some text
## Header 3 {MD022}
Some text
## Header 4 {MD022}
## Header 5
* This shouldn't trigger MD022, but did because of some bug where we tried to
#catch headers that kramdown didn't parse correctly.

View file

@ -1,15 +0,0 @@
Header 1
========
Header 2 {MD022}
----------------
Some text {MD022} {MD025}
Header 3
================
Some text {MD022} {MD025}
Header 4
================
Some text
Header 5
--------

View file

@ -0,0 +1,11 @@
# Heading 1
## Heading 2
## Heading 1
### Heading 2
## Heading 3
{MD024:5} {MD024:7}

7
test/headings_bad.md Normal file
View file

@ -0,0 +1,7 @@
# Heading
### Heading 3 {MD001}
## Heading 2
#### Heading 4 {MD001}

View file

@ -0,0 +1,11 @@
Heading 1
=========
Heading 2
---------
## Heading 2 {MD003}
### Heading 3
#### Heading 4 {MD003} ####

View file

@ -0,0 +1,11 @@
Heading 1
=========
Heading 2
---------
## Heading 2 {MD003} ##
### Heading 3 ###
#### Heading 4 {MD003}

View file

@ -0,0 +1,12 @@
# Heading 1
## Heading 2 {MD022}
Some text
## Heading 3 {MD022}
Some text
## Heading 4 {MD022}
## Heading 5
* This shouldn't trigger MD022, but did because of some bug where we tried to
#catch headings that kramdown didn't parse correctly.

View file

@ -0,0 +1,15 @@
Heading 1
=========
Heading 2 {MD022}
-----------------
Some text {MD022} {MD025}
Heading 3
=================
Some text {MD022} {MD025}
Heading 4
=================
Some text
Heading 5
---------

View file

@ -1,6 +1,6 @@
Some text
# Header 1 {MD023}
# Heading 1 {MD023}
Setext style fully indented {MD023}
===================================
@ -16,5 +16,5 @@ Some text
```
* This is another case where MD023 shouldn't be triggered
# Test {MD023} Valid header for CommonMark (see section 5.2)
# Test {MD023} Also valid header for CommonMark
# Test {MD023} Valid heading for CommonMark (see section 5.2)
# Test {MD023} Also valid heading for CommonMark

View file

@ -4,4 +4,4 @@ draft = true
title = "Good to Great Book Review"
+++
# Header 1
# Heading 1

View file

@ -5,4 +5,4 @@ title = "Good to Great Book Review"
+++
# Header 1 {MD041}
# Heading 1 {MD041}

View file

@ -1,6 +0,0 @@
# Header 1 {MD003} #
## Header 2
Header 3 {MD003}
----------------

View file

@ -1,6 +0,0 @@
# Header 1 #
## Header 2 {MD003}
Header 3 {MD003}
----------------

View file

@ -1,6 +0,0 @@
# Header 1 {MD003} #
## Header 2 {MD003}
Header 3
--------

View file

@ -0,0 +1,6 @@
# Heading 1 {MD003} #
## Heading 2
Heading 3 {MD003}
-----------------

View file

@ -0,0 +1,6 @@
# Heading 1 #
## Heading 2 {MD003}
Heading 3 {MD003}
-----------------

View file

@ -0,0 +1,6 @@
# Heading 1 {MD003} #
## Heading 2 {MD003}
Heading 3
---------

View file

@ -1,4 +1,4 @@
# Header
# Heading
hard tab {MD010} / space * in * emphasis {MD037} / space ` in ` code {MD038}

View file

@ -1,6 +1,6 @@
# Regular header
# Regular heading
<h1>Inline HTML Header {MD033}</h1>
<h1>Inline HTML Heading {MD033}</h1>
<p>More inline HTML {MD033}
but this time on multiple lines

View file

@ -9,8 +9,8 @@ tags:
url: http://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.
---
# header1
# heading1
This is just a sample post.
### offending header3 {MD001}
### offending heading3 {MD001}

View file

@ -3,18 +3,18 @@
* list
* list
# Header 1
# Heading 1
* list
* list
# Header 2 #
# Heading 2 #
* list
* list
Header 3
========
Heading 3
=========
* list
* list

View file

@ -1,6 +1,6 @@
{
"default": true,
"MD013": {
"headers": false
"headings": false
}
}

View file

@ -1,20 +1,20 @@
# Header
# Heading
Text
## Header header header header header header header header header header header header header header header header
## Heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading
Text
Text text text text text text text text text text text text text text text text text text text text text text text text {MD013}
## Header header
## Heading heading
Text
Text text text text text text text text text text text text text text text text text text text text text text text text {MD013}
### Header header header header header header header header header header header header header header header header header
### Heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading
Text

View file

@ -11,18 +11,18 @@ Here is a very very very very very very very very very very very very very very
This is a short line.
| First Header | Second Header | Third Header | Fourth Header | Fifth Header | Sixth Header | {MD013}
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | {MD013}
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | {MD013}
| ============= | ============= | ============= | ============= | ============= | ============= | {MD013}
| Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | {MD013}
| First Heading | Second Heading | Third Heading | Fourth Heading | Fifth Heading | Sixth Heading | {MD013}
| -------------- | -------------- | -------------- | -------------- | -------------- | -------------- | {MD013}
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | {MD013}
| ============== | ============== | ============== | ============== | ============== | ============== | {MD013}
| Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | {MD013}
This is a very very very very very very very very very very very very very very very very very very very very long line. {MD013}
Another line.
| First Header | Second Header | Third Header | Fourth Header | Fifth Header | Sixth Header | {MD013}
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | {MD013}
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | {MD013}
| ============= | ============= | ============= | ============= | ============= | ============= | {MD013}
| Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | {MD013}
| First Heading | Second Heading | Third Heading | Fourth Heading | Fifth Heading | Sixth Heading | {MD013}
| -------------- | -------------- | -------------- | -------------- | -------------- | -------------- | {MD013}
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | {MD013}
| ============== | ============== | ============== | ============== | ============== | ============== | {MD013}
| Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | {MD013}

View file

@ -18,28 +18,28 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
This is a short line.
| First Header | Second Header | Third Header | Fourth Header | Fifth Header | Sixth Header |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| ============= | ============= | ============= | ============= | ============= | ============= |
| Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell |
| First Heading | Second Heading | Third Heading | Fourth Heading | Fifth Heading | Sixth Heading |
| -------------- | -------------- | -------------- | -------------- | -------------- | -------------- |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| -------------- | -------------- | -------------- | -------------- | -------------- | -------------- |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| ============== | ============== | ============== | ============== | ============== | ============== |
| Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell |
{: rules="groups"}
This is a very very very very very very very very very very very very very very very very very very very very long line. {MD013}
Another line.
| First Header | Second Header | Third Header | Fourth Header | Fifth Header | Sixth Header |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| ============= | ============= | ============= | ============= | ============= | ============= |
| Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell |
| First Heading | Second Heading | Third Heading | Fourth Heading | Fifth Heading | Sixth Heading |
| -------------- | -------------- | -------------- | -------------- | -------------- | -------------- |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| -------------- | -------------- | -------------- | -------------- | -------------- | -------------- |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| Content Cell | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell |
| ============== | ============== | ============== | ============== | ============== | ============== |
| Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell | Footer Cell |
{: rules="groups"}

View file

@ -1,4 +1,4 @@
# Header
# Heading
Text with Markdown Extra footnote[^1]

View file

@ -101,8 +101,8 @@ module.exports.resultFormattingV0 = function resultFormattingV0(test) {
test.expect(4);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": defaultConfig,
"resultVersion": 0
@ -110,41 +110,41 @@ module.exports.resultFormattingV0 = function resultFormattingV0(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD002": [ 3 ],
"MD018": [ 1 ],
"MD019": [ 3, 5 ]
},
"./test/first_header_bad_atx.md": {
"./test/first_heading_bad_atx.md": {
"MD002": [ 1 ]
}
};
test.deepEqual(actualResult, expectedResult, "Undetected issues.");
var actualMessage = actualResult.toString();
var expectedMessage =
"./test/atx_header_spacing.md: 3: MD002" +
" First header should be a top level header\n" +
"./test/atx_header_spacing.md: 1: MD018" +
" No space after hash on atx style header\n" +
"./test/atx_header_spacing.md: 3: MD019" +
" Multiple spaces after hash on atx style header\n" +
"./test/atx_header_spacing.md: 5: MD019" +
" Multiple spaces after hash on atx style header\n" +
"./test/first_header_bad_atx.md: 1: MD002" +
" First header should be a top level header";
"./test/atx_heading_spacing.md: 3: MD002" +
" First heading should be a top level heading\n" +
"./test/atx_heading_spacing.md: 1: MD018" +
" No space after hash on atx style heading\n" +
"./test/atx_heading_spacing.md: 3: MD019" +
" Multiple spaces after hash on atx style heading\n" +
"./test/atx_heading_spacing.md: 5: MD019" +
" Multiple spaces after hash on atx style heading\n" +
"./test/first_heading_bad_atx.md: 1: MD002" +
" First heading should be a top level heading";
test.equal(actualMessage, expectedMessage, "Incorrect message (name).");
actualMessage = actualResult.toString(true);
expectedMessage =
"./test/atx_header_spacing.md: 3: first-header-h1" +
" First header should be a top level header\n" +
"./test/atx_header_spacing.md: 1: no-missing-space-atx" +
" No space after hash on atx style header\n" +
"./test/atx_header_spacing.md: 3: no-multiple-space-atx" +
" Multiple spaces after hash on atx style header\n" +
"./test/atx_header_spacing.md: 5: no-multiple-space-atx" +
" Multiple spaces after hash on atx style header\n" +
"./test/first_header_bad_atx.md: 1: first-header-h1" +
" First header should be a top level header";
"./test/atx_heading_spacing.md: 3: first-heading-h1" +
" First heading should be a top level heading\n" +
"./test/atx_heading_spacing.md: 1: no-missing-space-atx" +
" No space after hash on atx style heading\n" +
"./test/atx_heading_spacing.md: 3: no-multiple-space-atx" +
" Multiple spaces after hash on atx style heading\n" +
"./test/atx_heading_spacing.md: 5: no-multiple-space-atx" +
" Multiple spaces after hash on atx style heading\n" +
"./test/first_heading_bad_atx.md: 1: first-heading-h1" +
" First heading should be a top level heading";
test.equal(actualMessage, expectedMessage, "Incorrect message (alias).");
test.done();
});
@ -154,49 +154,49 @@ module.exports.resultFormattingSyncV0 = function resultFormattingSyncV0(test) {
test.expect(3);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": defaultConfig,
"resultVersion": 0
};
var actualResult = markdownlint.sync(options);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD002": [ 3 ],
"MD018": [ 1 ],
"MD019": [ 3, 5 ]
},
"./test/first_header_bad_atx.md": {
"./test/first_heading_bad_atx.md": {
"MD002": [ 1 ]
}
};
test.deepEqual(actualResult, expectedResult, "Undetected issues.");
var actualMessage = actualResult.toString();
var expectedMessage =
"./test/atx_header_spacing.md: 3: MD002" +
" First header should be a top level header\n" +
"./test/atx_header_spacing.md: 1: MD018" +
" No space after hash on atx style header\n" +
"./test/atx_header_spacing.md: 3: MD019" +
" Multiple spaces after hash on atx style header\n" +
"./test/atx_header_spacing.md: 5: MD019" +
" Multiple spaces after hash on atx style header\n" +
"./test/first_header_bad_atx.md: 1: MD002" +
" First header should be a top level header";
"./test/atx_heading_spacing.md: 3: MD002" +
" First heading should be a top level heading\n" +
"./test/atx_heading_spacing.md: 1: MD018" +
" No space after hash on atx style heading\n" +
"./test/atx_heading_spacing.md: 3: MD019" +
" Multiple spaces after hash on atx style heading\n" +
"./test/atx_heading_spacing.md: 5: MD019" +
" Multiple spaces after hash on atx style heading\n" +
"./test/first_heading_bad_atx.md: 1: MD002" +
" First heading should be a top level heading";
test.equal(actualMessage, expectedMessage, "Incorrect message (name).");
actualMessage = actualResult.toString(true);
expectedMessage =
"./test/atx_header_spacing.md: 3: first-header-h1" +
" First header should be a top level header\n" +
"./test/atx_header_spacing.md: 1: no-missing-space-atx" +
" No space after hash on atx style header\n" +
"./test/atx_header_spacing.md: 3: no-multiple-space-atx" +
" Multiple spaces after hash on atx style header\n" +
"./test/atx_header_spacing.md: 5: no-multiple-space-atx" +
" Multiple spaces after hash on atx style header\n" +
"./test/first_header_bad_atx.md: 1: first-header-h1" +
" First header should be a top level header";
"./test/atx_heading_spacing.md: 3: first-heading-h1" +
" First heading should be a top level heading\n" +
"./test/atx_heading_spacing.md: 1: no-missing-space-atx" +
" No space after hash on atx style heading\n" +
"./test/atx_heading_spacing.md: 3: no-multiple-space-atx" +
" Multiple spaces after hash on atx style heading\n" +
"./test/atx_heading_spacing.md: 5: no-multiple-space-atx" +
" Multiple spaces after hash on atx style heading\n" +
"./test/first_heading_bad_atx.md: 1: first-heading-h1" +
" First heading should be a top level heading";
test.equal(actualMessage, expectedMessage, "Incorrect message (alias).");
test.done();
};
@ -206,11 +206,11 @@ module.exports.resultFormattingV1 = function resultFormattingV1(test) {
var options = {
"strings": {
"truncate":
"# Multiple spaces inside hashes on closed atx style header #"
"# Multiple spaces inside hashes on closed atx style heading #"
},
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": defaultConfig,
"resultVersion": 1
@ -223,46 +223,46 @@ module.exports.resultFormattingV1 = function resultFormattingV1(test) {
"ruleName": "MD021",
"ruleAlias": "no-multiple-space-closed-atx",
"ruleDescription":
"Multiple spaces inside hashes on closed atx style header",
"Multiple spaces inside hashes on closed atx style heading",
"errorDetail": null,
"errorContext": "# Multiple spa...style header #",
"errorContext": "# Multiple spa...tyle heading #",
"errorRange": [ 1, 4 ] }
],
"./test/atx_header_spacing.md": [
"./test/atx_heading_spacing.md": [
{ "lineNumber": 3,
"ruleName": "MD002",
"ruleAlias": "first-header-h1",
"ruleDescription": "First header should be a top level header",
"ruleAlias": "first-heading-h1",
"ruleDescription": "First heading should be a top level heading",
"errorDetail": "Expected: h1; Actual: h2",
"errorContext": null,
"errorRange": null },
{ "lineNumber": 1,
"ruleName": "MD018",
"ruleAlias": "no-missing-space-atx",
"ruleDescription": "No space after hash on atx style header",
"ruleDescription": "No space after hash on atx style heading",
"errorDetail": null,
"errorContext": "#Header 1 {MD018}",
"errorContext": "#Heading 1 {MD018}",
"errorRange": [ 1, 2 ] },
{ "lineNumber": 3,
"ruleName": "MD019",
"ruleAlias": "no-multiple-space-atx",
"ruleDescription": "Multiple spaces after hash on atx style header",
"ruleDescription": "Multiple spaces after hash on atx style heading",
"errorDetail": null,
"errorContext": "## Header 2 {MD019}",
"errorContext": "## Heading 2 {MD019}",
"errorRange": [ 1, 5 ] },
{ "lineNumber": 5,
"ruleName": "MD019",
"ruleAlias": "no-multiple-space-atx",
"ruleDescription": "Multiple spaces after hash on atx style header",
"ruleDescription": "Multiple spaces after hash on atx style heading",
"errorDetail": null,
"errorContext": "## Header 3 {MD019}",
"errorContext": "## Heading 3 {MD019}",
"errorRange": [ 1, 6 ] }
],
"./test/first_header_bad_atx.md": [
"./test/first_heading_bad_atx.md": [
{ "lineNumber": 1,
"ruleName": "MD002",
"ruleAlias": "first-header-h1",
"ruleDescription": "First header should be a top level header",
"ruleAlias": "first-heading-h1",
"ruleDescription": "First heading should be a top level heading",
"errorDetail": "Expected: h1; Actual: h2",
"errorContext": null,
"errorRange": null }
@ -272,22 +272,22 @@ module.exports.resultFormattingV1 = function resultFormattingV1(test) {
var actualMessage = actualResult.toString();
var expectedMessage =
"truncate: 1: MD021/no-multiple-space-closed-atx" +
" Multiple spaces inside hashes on closed atx style header" +
" [Context: \"# Multiple spa...style header #\"]\n" +
"./test/atx_header_spacing.md: 3: MD002/first-header-h1" +
" First header should be a top level header" +
" Multiple spaces inside hashes on closed atx style heading" +
" [Context: \"# Multiple spa...tyle heading #\"]\n" +
"./test/atx_heading_spacing.md: 3: MD002/first-heading-h1" +
" First heading should be a top level heading" +
" [Expected: h1; Actual: h2]\n" +
"./test/atx_header_spacing.md: 1: MD018/no-missing-space-atx" +
" No space after hash on atx style header" +
" [Context: \"#Header 1 {MD018}\"]\n" +
"./test/atx_header_spacing.md: 3: MD019/no-multiple-space-atx" +
" Multiple spaces after hash on atx style header" +
" [Context: \"## Header 2 {MD019}\"]\n" +
"./test/atx_header_spacing.md: 5: MD019/no-multiple-space-atx" +
" Multiple spaces after hash on atx style header" +
" [Context: \"## Header 3 {MD019}\"]\n" +
"./test/first_header_bad_atx.md: 1: MD002/first-header-h1" +
" First header should be a top level header" +
"./test/atx_heading_spacing.md: 1: MD018/no-missing-space-atx" +
" No space after hash on atx style heading" +
" [Context: \"#Heading 1 {MD018}\"]\n" +
"./test/atx_heading_spacing.md: 3: MD019/no-multiple-space-atx" +
" Multiple spaces after hash on atx style heading" +
" [Context: \"## Heading 2 {MD019}\"]\n" +
"./test/atx_heading_spacing.md: 5: MD019/no-multiple-space-atx" +
" Multiple spaces after hash on atx style heading" +
" [Context: \"## Heading 3 {MD019}\"]\n" +
"./test/first_heading_bad_atx.md: 1: MD002/first-heading-h1" +
" First heading should be a top level heading" +
" [Expected: h1; Actual: h2]";
test.equal(actualMessage, expectedMessage, "Incorrect message.");
test.done();
@ -299,11 +299,11 @@ module.exports.resultFormattingV2 = function resultFormattingV2(test) {
var options = {
"strings": {
"truncate":
"# Multiple spaces inside hashes on closed atx style header #"
"# Multiple spaces inside hashes on closed atx style heading #"
},
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": defaultConfig
};
@ -314,41 +314,41 @@ module.exports.resultFormattingV2 = function resultFormattingV2(test) {
{ "lineNumber": 1,
"ruleNames": [ "MD021", "no-multiple-space-closed-atx" ],
"ruleDescription":
"Multiple spaces inside hashes on closed atx style header",
"Multiple spaces inside hashes on closed atx style heading",
"errorDetail": null,
"errorContext": "# Multiple spa...style header #",
"errorContext": "# Multiple spa...tyle heading #",
"errorRange": [ 1, 4 ] }
],
"./test/atx_header_spacing.md": [
"./test/atx_heading_spacing.md": [
{ "lineNumber": 3,
"ruleNames": [ "MD002", "first-header-h1" ],
"ruleDescription": "First header should be a top level header",
"ruleNames": [ "MD002", "first-heading-h1", "first-header-h1" ],
"ruleDescription": "First heading should be a top level heading",
"errorDetail": "Expected: h1; Actual: h2",
"errorContext": null,
"errorRange": null },
{ "lineNumber": 1,
"ruleNames": [ "MD018", "no-missing-space-atx" ],
"ruleDescription": "No space after hash on atx style header",
"ruleDescription": "No space after hash on atx style heading",
"errorDetail": null,
"errorContext": "#Header 1 {MD018}",
"errorContext": "#Heading 1 {MD018}",
"errorRange": [ 1, 2 ] },
{ "lineNumber": 3,
"ruleNames": [ "MD019", "no-multiple-space-atx" ],
"ruleDescription": "Multiple spaces after hash on atx style header",
"ruleDescription": "Multiple spaces after hash on atx style heading",
"errorDetail": null,
"errorContext": "## Header 2 {MD019}",
"errorContext": "## Heading 2 {MD019}",
"errorRange": [ 1, 5 ] },
{ "lineNumber": 5,
"ruleNames": [ "MD019", "no-multiple-space-atx" ],
"ruleDescription": "Multiple spaces after hash on atx style header",
"ruleDescription": "Multiple spaces after hash on atx style heading",
"errorDetail": null,
"errorContext": "## Header 3 {MD019}",
"errorContext": "## Heading 3 {MD019}",
"errorRange": [ 1, 6 ] }
],
"./test/first_header_bad_atx.md": [
"./test/first_heading_bad_atx.md": [
{ "lineNumber": 1,
"ruleNames": [ "MD002", "first-header-h1" ],
"ruleDescription": "First header should be a top level header",
"ruleNames": [ "MD002", "first-heading-h1", "first-header-h1" ],
"ruleDescription": "First heading should be a top level heading",
"errorDetail": "Expected: h1; Actual: h2",
"errorContext": null,
"errorRange": null }
@ -358,22 +358,24 @@ module.exports.resultFormattingV2 = function resultFormattingV2(test) {
var actualMessage = actualResult.toString();
var expectedMessage =
"truncate: 1: MD021/no-multiple-space-closed-atx" +
" Multiple spaces inside hashes on closed atx style header" +
" [Context: \"# Multiple spa...style header #\"]\n" +
"./test/atx_header_spacing.md: 3: MD002/first-header-h1" +
" First header should be a top level header" +
" Multiple spaces inside hashes on closed atx style heading" +
" [Context: \"# Multiple spa...tyle heading #\"]\n" +
"./test/atx_heading_spacing.md: 3:" +
" MD002/first-heading-h1/first-header-h1" +
" First heading should be a top level heading" +
" [Expected: h1; Actual: h2]\n" +
"./test/atx_header_spacing.md: 1: MD018/no-missing-space-atx" +
" No space after hash on atx style header" +
" [Context: \"#Header 1 {MD018}\"]\n" +
"./test/atx_header_spacing.md: 3: MD019/no-multiple-space-atx" +
" Multiple spaces after hash on atx style header" +
" [Context: \"## Header 2 {MD019}\"]\n" +
"./test/atx_header_spacing.md: 5: MD019/no-multiple-space-atx" +
" Multiple spaces after hash on atx style header" +
" [Context: \"## Header 3 {MD019}\"]\n" +
"./test/first_header_bad_atx.md: 1: MD002/first-header-h1" +
" First header should be a top level header" +
"./test/atx_heading_spacing.md: 1: MD018/no-missing-space-atx" +
" No space after hash on atx style heading" +
" [Context: \"#Heading 1 {MD018}\"]\n" +
"./test/atx_heading_spacing.md: 3: MD019/no-multiple-space-atx" +
" Multiple spaces after hash on atx style heading" +
" [Context: \"## Heading 2 {MD019}\"]\n" +
"./test/atx_heading_spacing.md: 5: MD019/no-multiple-space-atx" +
" Multiple spaces after hash on atx style heading" +
" [Context: \"## Heading 3 {MD019}\"]\n" +
"./test/first_heading_bad_atx.md: 1:" +
" MD002/first-heading-h1/first-header-h1" +
" First heading should be a top level heading" +
" [Expected: h1; Actual: h2]";
test.equal(actualMessage, expectedMessage, "Incorrect message.");
test.done();
@ -433,8 +435,8 @@ module.exports.defaultTrue = function defaultTrue(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {
"default": true
@ -444,13 +446,13 @@ module.exports.defaultTrue = function defaultTrue(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD002": [ 3 ],
"MD018": [ 1 ],
"MD019": [ 3, 5 ],
"MD041": [ 1 ]
},
"./test/first_header_bad_atx.md": {
"./test/first_heading_bad_atx.md": {
"MD002": [ 1 ],
"MD041": [ 1 ]
}
@ -464,8 +466,8 @@ module.exports.defaultFalse = function defaultFalse(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {
"default": false
@ -475,8 +477,8 @@ module.exports.defaultFalse = function defaultFalse(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {},
"./test/first_header_bad_atx.md": {}
"./test/atx_heading_spacing.md": {},
"./test/first_heading_bad_atx.md": {}
};
test.deepEqual(actualResult, expectedResult, "Undetected issues.");
test.done();
@ -487,8 +489,8 @@ module.exports.defaultUndefined = function defaultUndefined(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {},
"resultVersion": 0
@ -496,13 +498,13 @@ module.exports.defaultUndefined = function defaultUndefined(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD002": [ 3 ],
"MD018": [ 1 ],
"MD019": [ 3, 5 ],
"MD041": [ 1 ]
},
"./test/first_header_bad_atx.md": {
"./test/first_heading_bad_atx.md": {
"MD002": [ 1 ],
"MD041": [ 1 ]
}
@ -516,8 +518,8 @@ module.exports.disableRules = function disableRules(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {
"MD002": false,
@ -530,10 +532,10 @@ module.exports.disableRules = function disableRules(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD018": [ 1 ]
},
"./test/first_header_bad_atx.md": {}
"./test/first_heading_bad_atx.md": {}
};
test.deepEqual(actualResult, expectedResult, "Undetected issues.");
test.done();
@ -544,8 +546,8 @@ module.exports.enableRules = function enableRules(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {
"MD002": true,
@ -557,11 +559,11 @@ module.exports.enableRules = function enableRules(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD002": [ 3 ],
"MD019": [ 3, 5 ]
},
"./test/first_header_bad_atx.md": {
"./test/first_heading_bad_atx.md": {
"MD002": [ 1 ]
}
};
@ -574,8 +576,8 @@ module.exports.enableRulesMixedCase = function enableRulesMixedCase(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {
"Md002": true,
@ -587,11 +589,11 @@ module.exports.enableRulesMixedCase = function enableRulesMixedCase(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD002": [ 3 ],
"MD019": [ 3, 5 ]
},
"./test/first_header_bad_atx.md": {
"./test/first_heading_bad_atx.md": {
"MD002": [ 1 ]
}
};
@ -604,8 +606,8 @@ module.exports.disableTag = function disableTag(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {
"default": true,
@ -616,11 +618,11 @@ module.exports.disableTag = function disableTag(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD002": [ 3 ],
"MD041": [ 1 ]
},
"./test/first_header_bad_atx.md": {
"./test/first_heading_bad_atx.md": {
"MD002": [ 1 ],
"MD041": [ 1 ]
}
@ -634,8 +636,8 @@ module.exports.enableTag = function enableTag(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {
"default": false,
@ -647,11 +649,11 @@ module.exports.enableTag = function enableTag(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD018": [ 1 ],
"MD019": [ 3, 5 ]
},
"./test/first_header_bad_atx.md": {}
"./test/first_heading_bad_atx.md": {}
};
test.deepEqual(actualResult, expectedResult, "Undetected issues.");
test.done();
@ -662,8 +664,8 @@ module.exports.enableTagMixedCase = function enableTagMixedCase(test) {
test.expect(2);
var options = {
"files": [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
],
"config": {
"DeFaUlT": false,
@ -675,11 +677,11 @@ module.exports.enableTagMixedCase = function enableTagMixedCase(test) {
markdownlint(options, function callback(err, actualResult) {
test.ifError(err);
var expectedResult = {
"./test/atx_header_spacing.md": {
"./test/atx_heading_spacing.md": {
"MD018": [ 1 ],
"MD019": [ 3, 5 ]
},
"./test/first_header_bad_atx.md": {}
"./test/first_heading_bad_atx.md": {}
};
test.deepEqual(actualResult, expectedResult, "Undetected issues.");
test.done();
@ -797,7 +799,7 @@ module.exports.nullFrontMatter = function nullFrontMatter(test) {
test.expect(2);
markdownlint({
"strings": {
"content": "---\n\t\n---\n# Header\n"
"content": "---\n\t\n---\n# Heading\n"
},
"frontMatter": null,
"config": {
@ -819,7 +821,7 @@ module.exports.customFrontMatter = function customFrontMatter(test) {
test.expect(2);
markdownlint({
"strings": {
"content": "<head>\n\t\n</head>\n# Header\n"
"content": "<head>\n\t\n</head>\n# Heading\n"
},
"frontMatter": /<head>[^]*<\/head>/,
"config": {
@ -868,7 +870,7 @@ module.exports.noInlineConfig = function noInlineConfig(test) {
});
};
module.exports.readmeHeaders = function readmeHeaders(test) {
module.exports.readmeHeadings = function readmeHeadings(test) {
test.expect(2);
markdownlint({
"files": "README.md",
@ -879,7 +881,7 @@ module.exports.readmeHeaders = function readmeHeaders(test) {
"line_length": 150
},
"MD043": {
"headers": [
"headings": [
"# markdownlint",
"## Install",
"## Overview",
@ -922,8 +924,8 @@ module.exports.readmeHeaders = function readmeHeaders(test) {
module.exports.filesArrayNotModified = function filesArrayNotModified(test) {
test.expect(2);
var files = [
"./test/atx_header_spacing.md",
"./test/first_header_bad_atx.md"
"./test/atx_heading_spacing.md",
"./test/first_heading_bad_atx.md"
];
var expectedFiles = files.slice();
markdownlint({ "files": files }, function callback(err) {
@ -1024,7 +1026,7 @@ module.exports.missingStringValue = function missingStringValue(test) {
};
module.exports.readme = function readme(test) {
test.expect(108);
test.expect(109);
var tagToRules = {};
rules.forEach(function forRule(rule) {
rule.tags.forEach(function forTag(tag) {

View file

@ -1,4 +1,4 @@
# Header
# Heading
Text

View file

@ -1,4 +1,4 @@
# Header
# Heading
Head | Head
--------|------------

View file

@ -4,7 +4,7 @@
* **Emphasized item**
* Item
_Emphasis as header {MD036}_
_Emphasis as heading {MD036}_
1. **Emphasized item**
* Item
@ -14,4 +14,4 @@ _Emphasis as header {MD036}_
* **Emphasized item**
* Item
**Emphasis as header {MD036}**
**Emphasis as heading {MD036}**

View file

@ -1,6 +0,0 @@
# Header
## Header 2 {MD003} ##
Header 3 {MD003}
----------------

View file

@ -1,6 +0,0 @@
# Header 1 #
## Header 2 {MD003}
Header 3 {MD003}
----------------

View file

@ -1,6 +0,0 @@
Header 1
========
## Header 2 {MD003}
## Header 3 {MD003} ##

View file

@ -0,0 +1,6 @@
# Heading
## Heading 2 {MD003} ##
Heading 3 {MD003}
-----------------

View file

@ -0,0 +1,6 @@
# Heading 1 #
## Heading 2 {MD003}
Heading 3 {MD003}
-----------------

View file

@ -0,0 +1,6 @@
Heading 1
========
## Heading 2 {MD003}
## Heading 3 {MD003} ##

Some files were not shown because too many files have changed in this diff Show more