From a3f81e94534d6134d72b5fd938eda7ba7c6fe537 Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 1 Jun 2020 10:34:38 -0700 Subject: [PATCH] fix mimetype pattern match --- scripts/test-integration.bat | 3 +++ .../contrib/notebook/common/notebookOutputRenderer.ts | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/test-integration.bat b/scripts/test-integration.bat index e5e6c7d8892..f250eb40f80 100644 --- a/scripts/test-integration.bat +++ b/scripts/test-integration.bat @@ -42,6 +42,9 @@ if %errorlevel% neq 0 exit /b %errorlevel% :: Tests in the extension host +call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-notebook-tests\test --enable-proposed-api=vscode.vscode-notebook-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-notebook-tests --extensionTestsPath=%~dp0\..\extensions\vscode-notebook-tests\out --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% +if %errorlevel% neq 0 exit /b %errorlevel% + call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.ts b/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.ts index 796de2f51da..aa484dbfbaa 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.ts @@ -25,6 +25,10 @@ export class NotebookOutputRendererInfo { matches(mimeType: string) { let matched = this.mimeTypeGlobs.find(pattern => pattern(mimeType)); - return matched; + if (matched) { + return true; + } + + return this.mimeTypes.find(pattern => pattern === mimeType); } }