[GH-ISSUE #398] MD011 false positive #331

Closed
opened 2026-03-03 01:25:47 +03:00 by kerem · 1 comment
Owner

Originally created by @af4jm on GitHub (May 22, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/398

if I have xxx(xxx)[xxx] I get a violation of no-reversed-links... but if I backslash-escape any one of the 4 special characters the warning should go away, but it doesn't... even if I escape all 4 of them, the warning still fires

for example, for purposes of MD011, the following 2 sequences are identical... xxx(xxx)\[xxx] xxx(xxx)xxxx] yet the first one triggers a false positive

Originally created by @af4jm on GitHub (May 22, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/398 if I have `xxx(xxx)[xxx]` I get a violation of no-reversed-links... but if I backslash-escape any one of the 4 special characters the warning should go away, but it doesn't... even if I escape all 4 of them, the warning still fires for example, for purposes of MD011, the following 2 sequences are identical... `xxx(xxx)\[xxx]` `xxx(xxx)xxxx]` yet the first one triggers a false positive
kerem 2026-03-03 01:25:47 +03:00
Author
Owner

@DavidAnson commented on GitHub (May 22, 2021):

Thanks! I think this rule runs on parsed text, so it doesn't "see" the escaping. Here's an example of each scenario: https://dlaa.me/markdownlint/#%25m%23%20Reversed%20Links%0A%0Axxx(xxx)%5Bxxx%5D%0A%0Axxx%5C(xxx)%5Bxxx%5D%0A%0Axxx(xxx%5C)%5Bxxx%5D%0A%0Axxx(xxx)%5C%5Bxxx%5D%0A%0Axxx(xxx)%5Bxxx%5C%5D%0A

<!-- gh-comment-id:846456303 --> @DavidAnson commented on GitHub (May 22, 2021): Thanks! I think this rule runs on parsed text, so it doesn't "see" the escaping. Here's an example of each scenario: https://dlaa.me/markdownlint/#%25m%23%20Reversed%20Links%0A%0Axxx(xxx)%5Bxxx%5D%0A%0Axxx%5C(xxx)%5Bxxx%5D%0A%0Axxx(xxx%5C)%5Bxxx%5D%0A%0Axxx(xxx)%5C%5Bxxx%5D%0A%0Axxx(xxx)%5Bxxx%5C%5D%0A
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#331
No description provided.