Closed fregante closed 6 years ago
Related: should it support git+http urls at all?
Is there really any point? Clicking it wouldn't work anyway.
@sindresorhus it's mostly about expectations. Also perhaps people have git URL handlers that open SourceTree for example.
Who's' expectations though? I definitely wouldn't expect such URLs to be linkified. I actually don't want it at all, as it creates noise and gives a false expectation that they will work.
Also perhaps people have git URL handlers that open SourceTree for example.
That would be a minority, and everyone else would have to pay with useless links and wasted time clicking them and then realizing it's not working.
I see that -e git+https://github.com/scieloorg/xylose@1.17.5#egg=xylose
got linkified in your referenced example. I don't think we should linkify that either as it obviously doesn't work. In your linked case, it would make more sense for Octolinker to handle those.
How do we detect that though? The regex will have to look for the character that comes before http
as well
We would need a lookbehind regex pattern, which is still just a draft standard. Alternatively we could change it to also match git+
and then filter the URLs afterwards.
@bfred-it Could you change the test to what we've discussed? (Not allowing + prefixed URLs)
Not sure of how to do that :D
I'm only talking about the test, not the implementation. This is what I meant: https://github.com/sindresorhus/linkify-urls/commit/4db31ab79d62dc0adf6b3c086a6a68f955343918 :)
That’s unrelated to this PR, URLs with user:pass are still real HTTP and browsers can handle them
Oops, I was too focused on the + stuff.
Example (noticeable with Refined GitHub): https://github.com/scieloorg/opac_proc/blob/46d9f826d2519573b99418f11da1ce3f87bfa7eb/requirements.txt#L12-L14
Related: should it support
git+http
urls at all?