import * as vscode from 'vscode' ; export const Schemes = { http : 'http:' , https : 'https:' , file : 'file:' , untitled : 'untitled' , mailto : 'mailto:' , data : 'data:' , vscode : 'vscode:' , 'vscode-insiders' : 'vscode-insiders:' , 'vscode-resource' : 'vscode-resource:' , } ; const knownSchemes = [ ... Object . values ( Schemes ) , `${ vscode . env . uriScheme }:` ] ; export function getUriForLinkWithKnownExternalScheme ( link ) { if ( knownSchemes . some ( knownScheme => isOfScheme ( knownScheme , link ) ) ) { return vscode . Uri . parse ( link ) ; } return undefined ; } export function isOfScheme ( scheme , link ) { return link . toLowerCase ( ) . startsWith ( scheme ) ; } export const MarkdownFileExtensions = [ '.md' , '.mkd' , '.mdwn' , '.mdown' , '.markdown' , '.markdn' , '.mdtxt' , '.mdtext' , '.workbook' , ] ;