Skip to content

Commit

Permalink
0.9.6 (#341)
Browse files Browse the repository at this point in the history
* Fixed importing file with spaces in the path

* feat: Updated mermaid to the latest 10.6.0
  • Loading branch information
shd101wyy authored Oct 26, 2023
1 parent 29e70b2 commit fc27357
Show file tree
Hide file tree
Showing 6 changed files with 225 additions and 206 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ Please visit https://github.com/shd101wyy/vscode-markdown-preview-enhanced/relea

## [Unreleased]

## [0.9.6] - 2023-10-24

### 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

## [0.9.5] - 2023-10-23

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ I managed some of the libraries by myself instead of through npm to reduce the o
"font-awesome": "6.4.2", // Download from here: https://fontawesome.com/download
// Fontawesome cheatsheet is available here: https://kapeli.com/cheat_sheets/Font_Awesome.docset/Contents/Resources/Documents/index
"katex": "v0.16.9", // Only keep the css and fonts files.
"mermaid": "10.5.0", // https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js
"mermaid": "10.6.0", // https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js
"reveal": "4.6.0",

// NOTE: Don't forget to update `dependentLibraryMaterials` in `markdown-engine/index.ts`
Expand Down
407 changes: 206 additions & 201 deletions dependencies/mermaid/mermaid.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crossnote",
"version": "0.9.5",
"version": "0.9.6",
"description": "A powerful markdown notebook tool",
"keywords": [
"markdown"
Expand Down
2 changes: 1 addition & 1 deletion src/markdown-engine/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ window["initRevealPresentation"] = async function() {
'./dependencies/mermaid/mermaid.min.js',
)}" charset="UTF-8"></script>`;
} else {
mermaidScript = `<script src="https://${this.notebook.config.jsdelivrCdnHost}/npm/mermaid@10.5.0/dist/mermaid.min.js"></script>`;
mermaidScript = `<script src="https://${this.notebook.config.jsdelivrCdnHost}/npm/mermaid@10.6.0/dist/mermaid.min.js"></script>`;
}

mermaidInitScript += `<script type="module">
Expand Down
8 changes: 6 additions & 2 deletions src/markdown-engine/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,9 @@ export async function transformMarkdown(
} else {
outputString =
outputString +
`![@embedding](${filePath}){${stringifyBlockAttributes({
`![@embedding](${encodeURIComponent(
filePath,
)}){${stringifyBlockAttributes({
...config,
embedding: btoa(encodeURIComponent(output)),
})}}` +
Expand All @@ -984,7 +986,9 @@ export async function transformMarkdown(
} else {
outputString =
outputString +
`![@embedding](${filePath}){${stringifyBlockAttributes({
`![@embedding](${encodeURIComponent(
filePath,
)}){${stringifyBlockAttributes({
...config,
error: btoa(encodeURIComponent(output)),
})}}` +
Expand Down

0 comments on commit fc27357

Please sign in to comment.