Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
) >= 0
) {
utility.openFile(href);
} else if (href.match(/^file\:\/\/\//)) {
// openFilePath = href.slice(8) # remove protocol
let openFilePath = utility.addFileProtocol(
href.replace(/(\s*)[\#\?](.+)$/, ""),
); // remove #anchor and ?params...
openFilePath = decodeURI(openFilePath);
vscode.commands.executeCommand(
"vscode.open",
vscode.Uri.parse(openFilePath),
vscode.ViewColumn.One,
);
} else {
utility.openFile(href);
}
}