Add MD013 with tests.

This commit is contained in:
David Anson 2015-03-04 18:36:30 -08:00
parent 5d641bbf24
commit 434c7f388c
4 changed files with 30 additions and 0 deletions

View file

@ -232,6 +232,20 @@ module.exports = [
}
},
{
"name": "MD013",
"desc": "Line length",
"func": function MD013(params, errors) {
var lineLength = params.options.line_length || 80;
var regex = new RegExp("^.{" + lineLength + "}.*\\s");
params.lines.forEach(function forLine(line, lineIndex) {
if (regex.test(line)) {
errors.push(lineIndex + 1);
}
});
}
},
{
"name": "MD028",
"desc": "Blank line inside blockquote",