mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Small cleanups in markdown drop/paste (#189985)
- Observer cancellation more places - Create constants for mime types - Making code more consistent to show duplication
This commit is contained in:
22
extensions/markdown-language-features/src/util/mimes.ts
Normal file
22
extensions/markdown-language-features/src/util/mimes.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export const Mime = {
|
||||
textUriList: 'text/uri-list',
|
||||
textPlain: 'text/plain',
|
||||
} as const;
|
||||
|
||||
export const mediaMimes = new Set([
|
||||
'image/bmp',
|
||||
'image/gif',
|
||||
'image/jpeg',
|
||||
'image/png',
|
||||
'image/webp',
|
||||
'video/mp4',
|
||||
'video/ogg',
|
||||
'audio/mpeg',
|
||||
'audio/aac',
|
||||
'audio/x-wav',
|
||||
]);
|
||||
Reference in New Issue
Block a user