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

Fix parsing of file: URLs #106

Merged
merged 1 commit into from
Apr 22, 2022
Merged

Fix parsing of file: URLs #106

merged 1 commit into from
Apr 22, 2022

Conversation

jridgewell
Copy link
Owner

File URLs are a trip. They're supposed to be of like: file:///root/path/file.js (or file:///C:/path/file.js on Windows). But, the parsing is extremely loose. It doesn't require the regular // in the scheme, nor the leading / on the path. And they can parse a host in file://foo/bar, but not in file://C:/bar. Just trippy.

File URLs are a trip. They're supposed to be of like: `file:///root/path/file.js` (or
`file:///C:/path/file.js` on Windows). But, the parsing is extremely loose. It doesn't require the
regular `//` in the scheme, nor the leading `/` on the path. And they can parse a host in
`file://foo/bar`, but not in `file://C:/bar`. Just trippy.
@jridgewell jridgewell merged commit 1c61454 into main Apr 22, 2022
@jridgewell jridgewell deleted the files branch April 22, 2022 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant