-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Trailing punctuation is included in link (periods, question marks) #26
Comments
The regular expression comes from upstream and I think this is expected. There are times when links end with |
I don't think this is actually an argument. If it's just your code or my code, we can discuss this, sure. But we're talking about 3rd-party code on all historical commits on GitHub - can't go around asking people to rewrite their old commits. Would be interesting to hear more real-world examples for links with punctuation at the end. I'm guessing there aren't many. I think it's about what would happen more in real-world situations - links with punctuation at the end (which happen... almost never?) or instances of people adding punctuation at the end of links. I would guess there are tons of instances of the second case. So the tradeoff would be to break the URLs in the almost-never case of links with punctuation at the end in order to fix something that happens a lot.
I guess I would probably not suggest PRing this to upstream, since that module does its job nicely and does not have the constraints that cc @sindresorhus because ownership of upstream. |
I asked @sindresorhus to move this issue there. It won't be fixed here, especially because technically we're still waiting for Firefox to update to |
Ok, if it should be an issue on upstream, then maybe there would be a way it could make sense - a default-off option like |
refined-github/refined-github#381 introduced adding links to URLs in code, which is a really cool feature!
However, it doesn't follow the same rules as Markdown in Markdown code, such as the case where a link has a period at the end (the link on https://github.com/palmerhq/tsdx/pull/138/files goes to
https://github.com/alexreardon/tiny-invariant.
, with the period):I can think of two ways to deal with this off the top of my head (maybe there's a better / easier alternative):
The text was updated successfully, but these errors were encountered: