mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Reimplement MD014/commands-show-output using micromark tokens.
This commit is contained in:
parent
ec957029a5
commit
347302169c
6 changed files with 132 additions and 80 deletions
|
|
@ -74,3 +74,7 @@ All commands with no output:
|
|||
$ mkdir test {MD014}
|
||||
$ cd test {MD014}
|
||||
$ ls test {MD014}
|
||||
|
||||
Space-prefixed command with no output:
|
||||
|
||||
$ ls example {MD014}
|
||||
|
|
|
|||
|
|
@ -40,4 +40,8 @@ text
|
|||
$ npm install --save multimatch {MD014}
|
||||
```
|
||||
|
||||
text
|
||||
Space-prefixed command with no output:
|
||||
|
||||
```sh
|
||||
$ ls example {MD014}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -10083,6 +10083,25 @@ Generated by [AVA](https://avajs.dev).
|
|||
'commands-show-output',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: ' $ ls example {MD014}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
6,
|
||||
2,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 6,
|
||||
},
|
||||
lineNumber: 80,
|
||||
ruleDescription: 'Dollar signs used before commands without showing output',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md014.md',
|
||||
ruleNames: [
|
||||
'MD014',
|
||||
'commands-show-output',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: 'Expected: indented; Actual: fenced',
|
||||
|
|
@ -10173,6 +10192,10 @@ Generated by [AVA](https://avajs.dev).
|
|||
mkdir test {MD014}␊
|
||||
cd test {MD014}␊
|
||||
ls test {MD014}␊
|
||||
␊
|
||||
Space-prefixed command with no output:␊
|
||||
␊
|
||||
ls example {MD014}␊
|
||||
`,
|
||||
}
|
||||
|
||||
|
|
@ -10344,6 +10367,25 @@ Generated by [AVA](https://avajs.dev).
|
|||
'commands-show-output',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: ' $ ls example {MD014}',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
2,
|
||||
2,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 2,
|
||||
editColumn: 2,
|
||||
},
|
||||
lineNumber: 46,
|
||||
ruleDescription: 'Dollar signs used before commands without showing output',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md014.md',
|
||||
ruleNames: [
|
||||
'MD014',
|
||||
'commands-show-output',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# Code Block Dollar Fence␊
|
||||
␊
|
||||
|
|
@ -10387,7 +10429,11 @@ Generated by [AVA](https://avajs.dev).
|
|||
npm install --save multimatch {MD014}␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
text␊
|
||||
Space-prefixed command with no output:␊
|
||||
␊
|
||||
\`\`\`sh␊
|
||||
ls example {MD014}␊
|
||||
\`\`\`␊
|
||||
`,
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue