mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD013/line-length to include strict mode (fixes #237).
This commit is contained in:
parent
5ae5e448b0
commit
b39e5e309e
7 changed files with 78 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue