Reimplement MD038/no-space-in-code using micromark tokens.

This commit is contained in:
David Anson 2023-02-23 22:20:27 -08:00
parent b787758a48
commit 962547ecc8
6 changed files with 219 additions and 93 deletions

View file

@ -38877,6 +38877,46 @@ Generated by [AVA](https://avajs.dev).
'no-space-in-code',
],
},
{
errorContext: '``` ` multiple leading {MD038...',
errorDetail: null,
errorRange: [
6,
31,
],
fixInfo: {
deleteCount: 28,
editColumn: 9,
insertText: ' ` multiple leading {MD038}',
},
lineNumber: 129,
ruleDescription: 'Spaces inside code span elements',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md038.md',
ruleNames: [
'MD038',
'no-space-in-code',
],
},
{
errorContext: 'not allowed ` ``',
errorDetail: null,
errorRange: [
1,
17,
],
fixInfo: {
deleteCount: 15,
editColumn: 1,
insertText: 'not allowed ` ',
},
lineNumber: 136,
ruleDescription: 'Spaces inside code span elements',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md038.md',
ruleNames: [
'MD038',
'no-space-in-code',
],
},
{
errorContext: '#link%60link',
errorDetail: null,
@ -39080,6 +39120,21 @@ Generated by [AVA](https://avajs.dev).
Again, 2 characters: \` ab \`␊
Again, 1 character: \` a \`␊
Many internal spaces: \` code code code code code code \`␊
text \`\`\` \` leading space␊
allowed for backtick\`\`\` text␊
text \`\`\` \` multiple leading {MD038}␊
spaces not allowed\`\`\` text␊
text \`\`trailing space␊
allowed for backtick \` \`\` text␊
text \`\`multiple trailing spaces␊
not allowed \` \`\` text {MD038}␊
text \`\` \` leading and trailing␊
space allowed for backtick \` \`\` text␊
`,
}