mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD040/fenced-code-language to add allowed_languages parameter (fixes #610).
This commit is contained in:
parent
c333976a44
commit
01ba757d3a
12 changed files with 199 additions and 9 deletions
|
|
@ -29318,6 +29318,87 @@ Generated by [AVA](https://avajs.dev).
|
|||
`,
|
||||
}
|
||||
|
||||
## md040-allowed_languages.md
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
{
|
||||
errors: [
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: '"html" is not allowed',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 5,
|
||||
ruleDescription: 'Fenced code blocks should have a language specified',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md040',
|
||||
ruleNames: [
|
||||
'MD040',
|
||||
'fenced-code-language',
|
||||
],
|
||||
},
|
||||
{
|
||||
errorContext: null,
|
||||
errorDetail: '"css" is not allowed',
|
||||
errorRange: null,
|
||||
fixInfo: null,
|
||||
lineNumber: 11,
|
||||
ruleDescription: 'Fenced code blocks should have a language specified',
|
||||
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md040',
|
||||
ruleNames: [
|
||||
'MD040',
|
||||
'fenced-code-language',
|
||||
],
|
||||
},
|
||||
],
|
||||
fixed: `# md040-allowed_languages.md␊
|
||||
␊
|
||||
Code block with \`html\` not in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`html␊
|
||||
<h1>markdownlint</h1> {MD040:5}␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`css\` not in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`css␊
|
||||
body {} {MD040:11}␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`js\` in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`js␊
|
||||
console.log('markdownlint')␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`scss\` in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`scss␊
|
||||
body {␊
|
||||
h1 {␊
|
||||
color: red;␊
|
||||
}␊
|
||||
}␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`md\` in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`MD␊
|
||||
hello md␊
|
||||
\`\`\`␊
|
||||
␊
|
||||
Code block with \`TS\` in allowed_languages:␊
|
||||
␊
|
||||
\`\`\`ts␊
|
||||
body {␊
|
||||
h1 {␊
|
||||
color: red;␊
|
||||
}␊
|
||||
}␊
|
||||
\`\`\`␊
|
||||
`,
|
||||
}
|
||||
|
||||
## md041-ignore-leading-comments-combined.md
|
||||
|
||||
> Snapshot 1
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue