diff --git a/CHANGELOG.md b/CHANGELOG.md index c65efe3..473f42b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.8.10] - 2023-10-26 + +Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.9.6](https://github.com/shd101wyy/crossnote/releases/tag/0.9.6). + +### Changes + +- Updated mermaid.js to the latest version 10.6.0. + +### Bug fixes + +- Fixed importing file with spaces in the path: https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1857 +- Fixed a bug of updating the vscode `workbench.editorAssociations`: https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1860 + ## [0.8.9] - 2023-10-23 Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.9.5](https://github.com/shd101wyy/crossnote/releases/tag/0.9.5). diff --git a/package.json b/package.json index 390890c..222592c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "markdown-preview-enhanced", "displayName": "%displayName%", - "version": "0.8.9", + "version": "0.8.10", "description": "%description%", "categories": [ "Other" @@ -674,7 +674,7 @@ "@types/crypto-js": "^4.1.2", "@types/vfile": "^3.0.2", "async-mutex": "^0.4.0", - "crossnote": "^0.9.5", + "crossnote": "^0.9.6", "crypto-js": "^4.2.0" }, "devDependencies": { diff --git a/src/notebooks-manager.ts b/src/notebooks-manager.ts index 6db8a1f..ee15950 100644 --- a/src/notebooks-manager.ts +++ b/src/notebooks-manager.ts @@ -153,14 +153,12 @@ class NotebooksManager { // Add associations to editorAssociations newEditorAssociations = { ...editorAssociations, ...associations }; } else { - // delete associations from editorAssociations - newEditorAssociations = Object.fromEntries( - Object.entries(editorAssociations).filter(([key]) => { - return !markdownFileExtensions.find((ext) => { - return key.endsWith(ext); - }); - }), - ); + // delete associations from editorAssociations if exists and value is 'markdown-preview-enhanced' + markdownFileExtensions.forEach((ext) => { + if (editorAssociations[`*${ext}`] === 'markdown-preview-enhanced') { + delete newEditorAssociations[`*${ext}`]; + } + }); } if ( diff --git a/yarn.lock b/yarn.lock index 1207552..8603480 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1920,10 +1920,10 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crossnote@^0.9.5: - version "0.9.5" - resolved "https://registry.yarnpkg.com/crossnote/-/crossnote-0.9.5.tgz#47dea98d189a434c0e12943b7933bc4886207b31" - integrity sha512-Hx01jHsJSbmhopI9q2NM27K1ef3lyqgcxJye+Pb4/iLk2w+VNo+jKdAm6hoi+DxnNLOEov0KXCgUCJj4Qp1z4Q== +crossnote@^0.9.6: + version "0.9.6" + resolved "https://registry.yarnpkg.com/crossnote/-/crossnote-0.9.6.tgz#cda4f4f705762e08c11dacedf0ed9d90fa4fb144" + integrity sha512-jNJmYj7Q7YWI3Sm7omAezPQbPSo+LO+AmklA/Zr5PpKGGwblyClW/ESmxipxVhQ9zr2SMn9aUVNrglynemusuA== dependencies: "@headlessui/react" "^1.7.17" "@heroicons/react" "^2.0.18"