Update MD013/line-length to include strict mode (fixes #237).

This commit is contained in:
David Anson 2019-12-12 21:22:45 -08:00
parent 5ae5e448b0
commit b39e5e309e
7 changed files with 78 additions and 16 deletions

View file

@ -385,12 +385,8 @@ module.exports.rangeFromRegExp = function rangeFromRegExp(line, regexp) {
let range = null;
const match = line.match(regexp);
if (match) {
let column = match.index + 1;
let length = match[0].length;
if (match[2]) {
column += match[1].length;
length -= match[1].length;
}
const column = match.index + 1;
const length = match[0].length;
range = [ column, length ];
}
return range;