Skip to content

Commit 2b39f5a

Browse files
committed
Fixed URI test
1 parent 1b4e560 commit 2b39f5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: handler/uri.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ func pathToURI(path string) lsp.DocumentURI {
4141
}
4242
segments := strings.Split(path, string(filepath.Separator))
4343
for _, segment := range segments {
44-
urlObj.Path += "/" + url.PathEscape(segment)
44+
if len(segment) > 0 {
45+
urlObj.Path += "/" + url.PathEscape(segment)
46+
}
4547
}
4648
return lsp.DocumentURI(urlObj.String())
4749
}

0 commit comments

Comments
 (0)