Remove onCommand from markdown preview

This commit is contained in:
Matt Bierner
2018-09-21 13:36:37 -07:00
parent 388a62fe12
commit a101ececf4
7 changed files with 11 additions and 22 deletions

View File

@@ -133,7 +133,7 @@ document.addEventListener('click', event => {
}
if (node.href.startsWith('file://') || node.href.startsWith('vscode-resource:')) {
const [path, fragment] = node.href.replace(/^(file:\/\/|vscode-resource:)/i, '').split('#');
messaging.postCommand('_markdown.openDocumentLink', [{ path, fragment }]);
messaging.postMessage('clickLink', { path, fragment });
event.preventDefault();
event.stopPropagation();
break;