mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
small changes (#186574)
* bug fixes * added label to copyPaste.ts * added localized label to copyPasteLinks file
This commit is contained in:
@@ -27,8 +27,7 @@ class PasteEditProvider implements vscode.DocumentPasteEditProvider {
|
||||
return createEdit;
|
||||
}
|
||||
|
||||
const label = vscode.l10n.t('Insert Markdown Media');
|
||||
const uriEdit = new vscode.DocumentPasteEdit('', this._id, label);
|
||||
const uriEdit = new vscode.DocumentPasteEdit('', this._id, '');
|
||||
const urlList = await dataTransfer.get('text/uri-list')?.asString();
|
||||
if (!urlList) {
|
||||
return;
|
||||
@@ -38,6 +37,7 @@ class PasteEditProvider implements vscode.DocumentPasteEditProvider {
|
||||
return;
|
||||
}
|
||||
|
||||
uriEdit.label = pasteEdit.label;
|
||||
uriEdit.additionalEdit = pasteEdit.additionalEdits;
|
||||
uriEdit.priority = this._getPriority(dataTransfer);
|
||||
return uriEdit;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { getMarkdownLink } from './shared';
|
||||
|
||||
class PasteLinkEditProvider implements vscode.DocumentPasteEditProvider {
|
||||
|
||||
private readonly _id = 'insertMarkdownLink';
|
||||
readonly id = 'insertMarkdownLink';
|
||||
async provideDocumentPasteEdits(
|
||||
document: vscode.TextDocument,
|
||||
ranges: readonly vscode.Range[],
|
||||
@@ -28,8 +28,7 @@ class PasteLinkEditProvider implements vscode.DocumentPasteEditProvider {
|
||||
return;
|
||||
}
|
||||
|
||||
const label = vscode.l10n.t('Insert Markdown Link');
|
||||
const uriEdit = new vscode.DocumentPasteEdit('', this._id, label);
|
||||
const uriEdit = new vscode.DocumentPasteEdit('', this.id, '');
|
||||
const urlList = await item?.asString();
|
||||
if (!urlList) {
|
||||
return undefined;
|
||||
@@ -39,6 +38,7 @@ class PasteLinkEditProvider implements vscode.DocumentPasteEditProvider {
|
||||
return;
|
||||
}
|
||||
|
||||
uriEdit.label = pasteEdit.label;
|
||||
uriEdit.additionalEdit = pasteEdit.additionalEdits;
|
||||
return uriEdit;
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ export function createUriListSnippet(
|
||||
if (insertAsMedia) {
|
||||
insertedImageCount++;
|
||||
snippet.appendText('})`);
|
||||
|
||||
Reference in New Issue
Block a user