Improve highlighting for MD044/proper-names, add more tests.

This commit is contained in:
David Anson 2017-11-07 21:40:50 -08:00
parent 1668207213
commit 7acb3d72fd
4 changed files with 38 additions and 8 deletions

View file

@ -1186,7 +1186,8 @@ module.exports = [
.replace(/^\W*/, "").replace(/\W*$/, "");
if (names.indexOf(wordMatch) === -1) {
var lineNumber = token.lineNumber + index + fenceOffset;
errors.addDetailIf(lineNumber, name, match[1]);
var range = [ match.index + 1, wordMatch.length ];
errors.addDetailIf(lineNumber, name, match[1], range);
}
}
}