Skip to content

Commit

Permalink
Link to what's required for full Windows URI support
Browse files Browse the repository at this point in the history
  • Loading branch information
neilpa authored Mar 11, 2020
1 parent 661d897 commit 52ef91a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ func fileUri(path string) string {
uri := "file://"

if runtime.GOOS == "windows" {
// This is not formally correct for all corner cases in windows
// file handling but should work for all standard cases. See:
// https://docs.microsoft.com/en-us/archive/blogs/ie/file-uris-in-windows
uri = uri + "/" + strings.ReplaceAll(
strings.ReplaceAll(abs, "\\", "/"),
" ", "%20",
Expand Down

0 comments on commit 52ef91a

Please sign in to comment.