Add MD040 with tests.

This commit is contained in:
David Anson 2015-04-16 09:13:56 -07:00
parent 7e431f4499
commit 5d6d9d2b3b
10 changed files with 54 additions and 7 deletions

View file

@ -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);
}
});
}
}
];