mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #956] '\' used to escape a '_' in the URL is invalid according to MD051 #2413
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2413
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FlorentPoinsaut on GitHub (Sep 6, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/956
The '' character used to escape a '_' character in the URL is invalid according to MD051.
Example :
[nfs](#module\_nfs)is invalidBut if I try here, it is correctly interpreted: https://spec.commonmark.org/dingus/?text=%5Bnfs%5D(%23module_nfs)%20%0A&smart=1
Is this deliberate behaviour?
I'm wondering because this breaks compatibility with terrafom-docs and I'd like to know whether I should ask them to correct this or not :-D
@DavidAnson commented on GitHub (Sep 6, 2023):
It should be unnecessary to escape the underscore in that scenario, but I need to look at the specifications to see if it's wrong to do so. I notice that the backslash is ignored in your example and by the markdown-it parser. I will look into this more when I'm not on my phone.
@DavidAnson commented on GitHub (Sep 6, 2023):
It seems to be ignored by the micromark parser as well.
@DavidAnson commented on GitHub (Sep 7, 2023):
CommonMark explicitly allows backslash escapes in link destinations: https://spec.commonmark.org/0.30/#example-22
@FlorentPoinsaut commented on GitHub (Sep 8, 2023):
Thank you so much for your responsiveness and all your hard work!