Fix highlighting of MD011/no-reversed-links when preceeded by decorated text.

This commit is contained in:
David Anson 2019-09-26 22:29:01 -07:00
parent a5f03d02d0
commit 3632ce28b9
4 changed files with 15 additions and 1 deletions

View file

@ -16,7 +16,8 @@ module.exports = {
let match = null;
while ((match = reversedLinkRe.exec(content)) !== null) {
const [ reversedLink, linkText, linkDestination ] = match;
const column = match.index + 1;
const line = params.lines[lineNumber - 1];
const column = line.indexOf(reversedLink) + 1;
const length = reversedLink.length;
addError(
onError,