Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/markdown-language-features/src/util/schemes.ts
3292 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
export const Schemes = Object.freeze({
7
http: 'http',
8
https: 'https',
9
file: 'file',
10
untitled: 'untitled',
11
mailto: 'mailto',
12
vscode: 'vscode',
13
'vscode-insiders': 'vscode-insiders',
14
notebookCell: 'vscode-notebook-cell',
15
});
16
17
export function isOfScheme(scheme: string, link: string): boolean {
18
return link.toLowerCase().startsWith(scheme + ':');
19
}
20
21