mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD040/fenced-code-language to use case-sensitive comparison for allowed languages (fixes #627).
This commit is contained in:
parent
30353cc733
commit
b73ab7fd91
8 changed files with 106 additions and 32 deletions
|
|
@ -29324,6 +29324,26 @@ Generated by [AVA](https://avajs.dev).
|
|||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
errorContext: '` scss`',
|
||||
errorDetail: null,
|
||||
errorRange: [
|
||||
17,
|
||||
7,
|
||||
],
|
||||
fixInfo: {
|
||||
deleteCount: 5,
|
||||
editColumn: 18,
|
||||
insertText: 'scss',
|
||||
},
|
||||
lineNumber: 39,
|
||||
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: null,
|
||||
errorDetail: '"html" is not allowed',
|
||||
|
|
@ -29350,6 +29370,32 @@ Generated by [AVA](https://avajs.dev).
|
|||
'fenced-code-language',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: '"MD" is not allowed',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 17,
|
||||
ruleDescription: 'Fenced code blocks should have a language specified',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md040.md',
|
||||
ruleNames: [
|
||||
'MD040',
|
||||
'fenced-code-language',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: '"ts" is not allowed',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 23,
|
||||
ruleDescription: 'Fenced code blocks should have a language specified',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md040.md',
|
||||
ruleNames: [
|
||||
'MD040',
|
||||
'fenced-code-language',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# md040-allowed_languages.md␊
|
||||
␊
|
||||
|
|
@ -29365,15 +29411,33 @@ Generated by [AVA](https://avajs.dev).
|
|||
body {} {MD040:11}␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`MD\` (uppercase) not in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`MD␊
|
||||
hello md {MD040:17}␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`ts\` (lowercase) not in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`ts␊
|
||||
let foo = "bar"; {MD040:23}␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`js\` in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`js␊
|
||||
console.log('markdownlint')␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`scss\` in allowed_languages:␊
|
||||
Code block with \`js foo\` allowed_languages:␊
|
||||
␊
|
||||
\`\`\`scss␊
|
||||
\`\`\`js foo␊
|
||||
console.log('bar')␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`scss\` (prefixed by a space) in allowed_languages: {MD038}␊
|
||||
␊
|
||||
\`\`\` scss␊
|
||||
body {␊
|
||||
h1 {␊
|
||||
color: red;␊
|
||||
|
|
@ -29381,15 +29445,15 @@ Generated by [AVA](https://avajs.dev).
|
|||
}␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`md\` in allowed_languages:␊
|
||||
Code block with \`md\` (lowercase) in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`MD␊
|
||||
\`\`\`md␊
|
||||
hello md␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`TS\` in allowed_languages:␊
|
||||
Code block with \`TS\` (uppercase) in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`ts␊
|
||||
\`\`\`TS␊
|
||||
body {␊
|
||||
h1 {␊
|
||||
color: red;␊
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue