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
Newer versions of markdown lint complain about links that wrap to a new line #552
Comments
A new line in that position is expressly allowed by the specification: https://spec.commonmark.org/0.30/#example-198 However, it is annoying for my purposes. I will look to update the library to stop reporting this pattern as a violation. |
Yeah, I can see that. I was just looking at the following function and while you do concatenate all the lines for "single-line exclusions for inline code spans" it's back to line by line for links: markdownlint/helpers/helpers.js Line 782 in 2488a5c
|
Waaaait a minute. I remembered that regular expression as wanting to match part of the link, but it does not. Trying your example in the demo app works fine for me: https://dlaa.me/markdownlint/#%25m%23%20Issue%20552%0A%0ASee%20%5Bhttp%20403%20forbidden%5D.%0A%0A%5Bhttp%20403%20forbidden%5D%3A%0A%20%20https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FHTTP%2FStatus%2F403%0A Can you show me the document where this is failing for you? There may be something else going on. |
@DavidAnson My apologies. The error I'm getting is MD053 and is triggering exactly for the reason it should. The link in question is not used. (I'm not the author of the document this triggered on and I had just assumed all the links in it were used, and therefore assumed the issue was due to the formatting) |
I'm coming from an older version of markdownlint: 0.8.1.
Our repo uses prettier to format all documents with
proseWrap: always
configured. This has the effect of wrapping links.For example here's a link we have in our doc:
It wasn't written this way but prettier formats it this way. With 0.8.1 markdownlint didn't issue any warning or error. With the latest version (0.26.2) which I just upgraded to, we now get an error:
Which seems like a MD052 violation.
I think (at least based upon the common mark spec) that a line break is allowed (bolding added by me):
There is an open issue on the prettier repo but it doesn't seem to have much traction.
prettier/prettier#9232
The text was updated successfully, but these errors were encountered: