mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Update MD011/no-reversed-links to avoid more nested paren scenarios (fixes #572).
This commit is contained in:
parent
56f379b0fc
commit
c333976a44
5 changed files with 69 additions and 25 deletions
|
|
@ -6,7 +6,7 @@ const { addError, forEachLine, withinAnyRange } = require("../helpers");
|
|||
const { codeBlockAndSpanRanges, lineMetadata } = require("./cache");
|
||||
|
||||
const reversedLinkRe =
|
||||
/(^|[^\\])\(([^)]+)\)\[([^\]^][^\]]*)](?!\()/g;
|
||||
/(^|[^\\])\(([^()]+)\)\[([^\]^][^\]]*)](?!\()/g;
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD011", "no-reversed-links" ],
|
||||
|
|
@ -30,7 +30,7 @@ module.exports = {
|
|||
onError,
|
||||
lineIndex + 1,
|
||||
reversedLink.slice(preChar.length),
|
||||
null,
|
||||
undefined,
|
||||
[ index + 1, length ],
|
||||
{
|
||||
"editColumn": index + 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue