mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Remove onCommand from markdown preview
This commit is contained in:
@@ -20,7 +20,7 @@ function normalizeLink(
|
||||
|
||||
// Assume it must be an relative or absolute file path
|
||||
// Use a fake scheme to avoid parse warnings
|
||||
const tempUri = vscode.Uri.parse(`fake-scheme:${link}`);
|
||||
const tempUri = vscode.Uri.parse(`vscode-resource:${link}`);
|
||||
|
||||
let resourcePath = tempUri.path;
|
||||
if (!tempUri.path) {
|
||||
|
||||
@@ -128,10 +128,6 @@ export class MarkdownPreview {
|
||||
this.onCacheImageSizes(e.body);
|
||||
break;
|
||||
|
||||
case 'command':
|
||||
vscode.commands.executeCommand(e.body.command, ...e.body.args);
|
||||
break;
|
||||
|
||||
case 'revealLine':
|
||||
this.onDidScrollPreview(e.body.line);
|
||||
break;
|
||||
@@ -140,6 +136,10 @@ export class MarkdownPreview {
|
||||
this.onDidClickPreview(e.body.line);
|
||||
break;
|
||||
|
||||
case 'clickLink':
|
||||
vscode.commands.executeCommand('_markdown.openDocumentLink', e.body);
|
||||
break;
|
||||
|
||||
case 'showPreviewSecuritySelector':
|
||||
vscode.commands.executeCommand('markdown.showPreviewSecuritySelector', e.body.source);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user