Fix bug in detailed error message for MD030/list-marker-space when no space present (fixes #57).

This commit is contained in:
David Anson 2017-05-06 21:56:24 -07:00
parent 942f0600d2
commit da529ac286
3 changed files with 52 additions and 1 deletions

View file

@ -758,7 +758,7 @@ module.exports = [
list.items.forEach(function forItem(item) {
var match = /^[\s>]*\S+(\s+)/.exec(item.line);
errors.addDetailIf(item.lineNumber,
expectedSpaces, !match || match[1].length);
expectedSpaces, (match ? match[1].length : 0));
});
});
}