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

foo:bar can not be normalized? #127

Closed
shrinktofit opened this issue Nov 25, 2020 · 2 comments
Closed

foo:bar can not be normalized? #127

shrinktofit opened this issue Nov 25, 2020 · 2 comments

Comments

@shrinktofit
Copy link

foo:bar is automatically converted into http:foo:bar by this lib.

@sindresorhus
Copy link
Owner

sindresorhus commented Nov 25, 2020

Yes, we assume // in the scheme. I guess we could loosen that. I don't remember if we made it strict for a reason.

urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol);

@sindresorhus
Copy link
Owner

Fixed by 882cb84

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