Skip to content

Commit

Permalink
💄 more use of Schemas.file for easier reference
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Sep 24, 2020
1 parent 9ab2cad commit 7506b2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/links/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export class LinkDetector implements IEditorContribution {
// Support for relative file URIs of the shape file://./relativeFile.txt or file:///./relativeFile.txt
if (typeof uri === 'string' && this.editor.hasModel()) {
const modelUri = this.editor.getModel().uri;
if (modelUri.scheme === Schemas.file && uri.startsWith('file:')) {
if (modelUri.scheme === Schemas.file && uri.startsWith(`${Schemas.file}:`)) {
const parsedUri = URI.parse(uri);
if (parsedUri.scheme === Schemas.file) {
const fsPath = resources.originalFSPath(parsedUri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class WebviewProtocolProvider extends Disposable {
} else {
url = require.toUrl(`vs/workbench/contrib/webview/browser/pre/${entry}`);
}
return callback(decodeURIComponent(url.replace('file://', '')));
return callback(decodeURIComponent(url.replace(`${Schemas.file}://`, '')));
}
} catch {
// noop
Expand Down

0 comments on commit 7506b2b

Please sign in to comment.