mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Remove file extension
This commit is contained in:
@ -26,7 +26,7 @@ export function activate({ subscriptions }: vscode.ExtensionContext) {
|
||||
subscriptions.push(vscode.commands.registerCommand('cowsay.say', async () => {
|
||||
const what = await vscode.window.showInputBox({ placeHolder: 'cowsay...' });
|
||||
if (what) {
|
||||
const uri = vscode.Uri.parse('cowsay:' + what + '.png');
|
||||
const uri = vscode.Uri.parse('cowsay:' + what);
|
||||
const doc = await vscode.workspace.openTextDocument(uri); // calls back into the provider
|
||||
await vscode.window.showTextDocument(doc, { preview: false });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user