Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'\' used to escape a '_' in the URL is invalid according to MD051 #956

Closed
FlorentPoinsaut opened this issue Sep 6, 2023 · 4 comments
Closed

Comments

@FlorentPoinsaut
Copy link

The '' character used to escape a '_' character in the URL is invalid according to MD051.

Example : [nfs](#module\_nfs) is invalid

But 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
Copy link
Owner

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
Copy link
Owner

It seems to be ignored by the micromark parser as well.

@DavidAnson DavidAnson added bug and removed question labels Sep 6, 2023
@DavidAnson
Copy link
Owner

CommonMark explicitly allows backslash escapes in link destinations: https://spec.commonmark.org/0.30/#example-22

@FlorentPoinsaut
Copy link
Author

Thank you so much for your responsiveness and all your hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants