Fix URI format for res scheme #2432
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With a recent Pyright version, some features don't work (i.e. error in console or error dialog) for package ressource files (View Package File from the command palette).
This is because we use
Packagesas the authority name inres:URIs, and the authority is converted to lowercase by vscode-uri library in the server responses. Instead, we should movePackagesto be part of thepathcomponent of the URI and leaveauthorityempty.See: microsoft/pyright#7495
The only case where I can find
res://being used in the Sublime Text API is in minihtml for the<img>element, see https://www.sublimetext.com/docs/minihtml.html#tags:For example with Terminus installed (as
.sublime-packagefrom Package Control), try in the console:But I consider this a bug or bad design in ST, they also should better support/use a single slash in
resURIs.Edit: The builtin
run_macro_filecommand also supportsres://URIs for its command argument.