Skip to content

Commit

Permalink
Fix microsoft#160729. Disable workspace md paste handler for notebook. (
Browse files Browse the repository at this point in the history
microsoft#160833)

Co-authored-by: Matt Bierner <[email protected]>
  • Loading branch information
rebornix and mjbvz authored Sep 15, 2022
1 parent 001f7d5 commit 0f05c6d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import * as path from 'path';
import * as vscode from 'vscode';
import { Utils } from 'vscode-uri';
import { Schemes } from '../util/schemes';
import { createUriListSnippet, tryGetUriListSnippet } from './dropIntoEditor';

const supportedImageMimes = new Set([
Expand All @@ -26,6 +27,10 @@ class PasteEditProvider implements vscode.DocumentPasteEditProvider {
return;
}

if (document.uri.scheme === Schemes.notebookCell) {
return;
}

for (const imageMime of supportedImageMimes) {
const file = dataTransfer.get(imageMime)?.asFile();
if (file) {
Expand Down

0 comments on commit 0f05c6d

Please sign in to comment.