-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Link parsing is more lenient than either GitHub or commonmark. #456
Comments
@samouri are you seeing this even when the option |
|
Reason for that is that GH used to support the space, but “pedantic” didn’t. If you’re willing to work on the problem, we would accept PRs with a fix. |
What is the usual protocol for informing downstream folks of this change? |
@samouri How do you mean? What are you worrying/wondering about? |
I know that prettier is dependent on this package. This will mean a different behavior when applying prettier to markdown files with this edgecase. I think it's a good change, but I figure any change at all could be disruptive for dependents (e.g. if they have some unit tests that start failing). |
This is arguable* a breaking change, yes. Whether a release is breaking is signalled through semver. * arguable because, if someone before wrote But indeed, remark-parse is used by millions of users, and we don’t want to break their flow. We’re generally on the safe side with releases. |
Thank you for the explanation! Makes sense 👍 |
summary
remark-parse
is currently pretty lenient about whitespace within links, more so than either GitHub or commonmark. Here is an example of text that I would not expect to become a link, yet currently does:In
remark-parse
, the(https://example.com)
text would be considered the address of the link, even though there is a space between the two parts.Is this intended? It feels like a bug. In particular this has been frustrating to me in its integrations with
prettier
, where I often am writing markdown intended for GitHub and the whitespace between the two parts is automatically stripped.If y'all consider this a bug, I'd be happy to submit a PR to fix it!
The text was updated successfully, but these errors were encountered: