Refactor to remove forEachLine and getLineMetadata helpers, reimplement MD012/MD018/MD020/MD031 using micromark tokens.

This commit is contained in:
David Anson 2024-08-17 17:58:16 -07:00
parent 7efc2605b1
commit c8fd9eb4b3
13 changed files with 198 additions and 308 deletions

View file

@ -35694,6 +35694,23 @@ Generated by [AVA](https://avajs.dev).
'blanks-around-fences',
],
},
{
errorContext: '```',
errorDetail: null,
errorRange: null,
fixInfo: {
insertText: `␊
`,
lineNumber: 66,
},
lineNumber: 66,
ruleDescription: 'Fenced code blocks should be surrounded by blank lines',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md031.md',
ruleNames: [
'MD031',
'blanks-around-fences',
],
},
{
errorContext: 'fence {MD031:64} {MD031:65} {M...',
errorDetail: null,
@ -35798,7 +35815,7 @@ Generated by [AVA](https://avajs.dev).
1. Text␊
\`\`\`shell␊
fence {MD031:64} {MD031:65} {MD032:65} {MD040:66}␊
fence {MD031:64} {MD031:65} {MD031:66} {MD032:65} {MD040:66}␊
\`\`\`␊
`,