mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Add MD040 with tests.
This commit is contained in:
parent
7e431f4499
commit
5d6d9d2b3b
10 changed files with 54 additions and 7 deletions
14
lib/rules.js
14
lib/rules.js
|
|
@ -752,5 +752,19 @@ module.exports = [
|
|||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "MD040",
|
||||
"desc": "Fenced code blocks should have a language specified",
|
||||
"tags": [ "code", "language" ],
|
||||
"func": function MD040(params, errors) {
|
||||
filterTokens(params.tokens, "fence")
|
||||
.forEach(function forToken(token) {
|
||||
if (!token.info.trim()) {
|
||||
errors.push(token.lineNumber);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue