diff --git a/CHANGELOG.md b/CHANGELOG.md index c7223ec..a296e52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.7.10] - 2023-09-24 + +Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.8.16](https://github.com/shd101wyy/crossnote/releases/tag/0.8.16) + +### New features + +- Added `head.html` config file to allow you to include custom HTML in the `
` of the preview. + This could be useful for adding custom CSS or JavaScript to the preview. + +### Bug fixes + +- Fixed the `none.css` preview theme bug https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1778. +- Fixed the bug of copying texts in preview https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1775. +- Added `` in `` while rendering code blocks in preview.
+
## [0.7.9] - 2023-09-17
Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.8.15](https://github.com/shd101wyy/crossnote/releases/tag/0.8.15)
diff --git a/package.json b/package.json
index 6d75234..7c89630 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "markdown-preview-enhanced",
"displayName": "%displayName%",
- "version": "0.7.9",
+ "version": "0.7.10",
"description": "%description%",
"categories": [
"Other"
@@ -620,7 +620,7 @@
"dependencies": {
"@types/crypto-js": "^4.1.2",
"@types/vfile": "^3.0.2",
- "crossnote": "^0.8.15",
+ "crossnote": "^0.8.16",
"crypto-js": "^4.1.1"
},
"devDependencies": {
diff --git a/src/extension-common.ts b/src/extension-common.ts
index fcc2747..47485de 100644
--- a/src/extension-common.ts
+++ b/src/extension-common.ts
@@ -645,13 +645,14 @@ export function initExtensionCommon(context: vscode.ExtensionContext) {
// - style.less
// - config.js
// - parser.js
+ // - head.html
// If so, refresh the preview of the workspace.
const workspaceUri = getWorkspaceFolderUri(document.uri);
const workspaceDir = workspaceUri.fsPath;
const relativePath = path.relative(workspaceDir, document.uri.fsPath);
if (
relativePath.startsWith('.crossnote') &&
- ['style.less', 'config.js', 'parser.js'].includes(
+ ['style.less', 'config.js', 'parser.js', 'head.html'].includes(
path.basename(relativePath),
)
) {
diff --git a/src/extension.ts b/src/extension.ts
index b4c7c59..e3e1046 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -19,7 +19,9 @@ export function activate(context: vscode.ExtensionContext) {
fs.watch(globalConfigPath, async (eventType, fileName) => {
if (
eventType === 'change' &&
- ['style.less', 'config.js', 'parser.js'].includes(fileName ?? '')
+ ['style.less', 'config.js', 'parser.js', 'head.html'].includes(
+ fileName ?? '',
+ )
) {
const providers = getAllPreviewProviders();
providers.forEach(async (provider) => {
diff --git a/yarn.lock b/yarn.lock
index 40deca7..615b7ed 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1890,10 +1890,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.8.15:
- version "0.8.15"
- resolved "https://registry.yarnpkg.com/crossnote/-/crossnote-0.8.15.tgz#bd30ec19fcddccb01d67d60be6b7e66b7cea6894"
- integrity sha512-W0jJY8K5TMcgZcC2yQLvxF/nAIjOSgRDDBF5mB1KPwdTWeqx0S35Z7y28cnX+MYvEGRTA2oDrjmD97p2smIHIg==
+crossnote@^0.8.16:
+ version "0.8.16"
+ resolved "https://registry.yarnpkg.com/crossnote/-/crossnote-0.8.16.tgz#9e0ffc810cdf8a0276c34c7a66838df63549bb07"
+ integrity sha512-SI4gl19HJFuwiXuJSb5CX2N6g+DkYouuzy1MjQ3Rri9OLGPzuQvc5NOGdPYFQXTuxVBSvLna/nL/6Y0NutyVqQ==
dependencies:
"@headlessui/react" "^1.7.17"
"@heroicons/react" "^2.0.18"