mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-03-09 20:02:33 +01:00
Reimplement MD019/no-multiple-space-atx using micromark tokens.
This commit is contained in:
parent
3003d244f9
commit
4ff3a27fa2
6 changed files with 174 additions and 89 deletions
|
|
@ -465,12 +465,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## Multiple spaces B {MD019}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
1,
|
||||
5,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 16,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -2622,12 +2622,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## Heading 2 {MD019}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
7,
|
||||
4,
|
||||
3,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 3,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 7,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -2983,12 +2983,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## Heading 2 {MD019}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
1,
|
||||
5,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 3,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -3002,12 +3002,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## Heading 3 {MD019}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
1,
|
||||
6,
|
||||
4,
|
||||
2,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 5,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -6999,12 +6999,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '# Heading 5 {MD019}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 27,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -15812,12 +15812,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## Extra normal space {MD019}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
1,
|
||||
5,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 23,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -15831,12 +15831,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## Extra Tab {MD019}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
1,
|
||||
5,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 27,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -16037,7 +16037,84 @@ Generated by [AVA](https://avajs.dev).
|
|||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [],
|
||||
errors: [
|
||||
{
|
||||
errorContext: '#',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
3,
|
||||
1,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 10,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md019.md',
|
||||
ruleNames: [
|
||||
'MD019',
|
||||
'no-multiple-space-atx',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '#',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
3,
|
||||
2,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 12,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md019.md',
|
||||
ruleNames: [
|
||||
'MD019',
|
||||
'no-multiple-space-atx',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '##',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
1,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 18,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md019.md',
|
||||
ruleNames: [
|
||||
'MD019',
|
||||
'no-multiple-space-atx',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: '##',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
2,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 20,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md019.md',
|
||||
ruleNames: [
|
||||
'MD019',
|
||||
'no-multiple-space-atx',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Headings Without Content␊
|
||||
␊
|
||||
<!-- markdownlint-disable single-title heading-style -->␊
|
||||
|
|
@ -16047,17 +16124,19 @@ Generated by [AVA](https://avajs.dev).
|
|||
␊
|
||||
# ␊
|
||||
␊
|
||||
# ␊
|
||||
# ␊
|
||||
␊
|
||||
# ␊
|
||||
# ␊
|
||||
␊
|
||||
##␊
|
||||
␊
|
||||
## ␊
|
||||
␊
|
||||
## ␊
|
||||
## ␊
|
||||
␊
|
||||
## ␊
|
||||
## ␊
|
||||
␊
|
||||
{MD019:10} {MD019:12} {MD019:18} {MD019:20}␊
|
||||
`,
|
||||
}
|
||||
|
||||
|
|
@ -37916,12 +37995,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## Heading 2b {MD019} {MD022}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
1,
|
||||
5,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 24,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -46613,12 +46692,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '# C',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 11,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -46632,12 +46711,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## I',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
1,
|
||||
5,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 31,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -46651,12 +46730,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '# OO',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 2,
|
||||
editColumn: 3,
|
||||
},
|
||||
lineNumber: 51,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
@ -46670,12 +46749,12 @@ Generated by [AVA](https://avajs.dev).
|
|||
errorContext: '## UU',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
4,
|
||||
1,
|
||||
5,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 1,
|
||||
editColumn: 3,
|
||||
editColumn: 4,
|
||||
},
|
||||
lineNumber: 71,
|
||||
ruleDescription: 'Multiple spaces after hash on atx style heading',
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue