Skip to content

Commit fc27357

Browse files
authored
0.9.6 (#341)
* Fixed importing file with spaces in the path * feat: Updated mermaid to the latest 10.6.0
1 parent 29e70b2 commit fc27357

File tree

6 files changed

+225
-206
lines changed

6 files changed

+225
-206
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ Please visit https://github.com/shd101wyy/vscode-markdown-preview-enhanced/relea
44

55
## [Unreleased]
66

7+
## [0.9.6] - 2023-10-24
8+
9+
### Changes
10+
11+
- Updated mermaid.js to the latest version 10.6.0.
12+
13+
### Bug fixes
14+
15+
- Fixed importing file with spaces in the path: https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1857
16+
717
## [0.9.5] - 2023-10-23
818

919
### Bug fixes

dependencies/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ I managed some of the libraries by myself instead of through npm to reduce the o
77
"font-awesome": "6.4.2", // Download from here: https://fontawesome.com/download
88
// Fontawesome cheatsheet is available here: https://kapeli.com/cheat_sheets/Font_Awesome.docset/Contents/Resources/Documents/index
99
"katex": "v0.16.9", // Only keep the css and fonts files.
10-
"mermaid": "10.5.0", // https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js
10+
"mermaid": "10.6.0", // https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js
1111
"reveal": "4.6.0",
1212

1313
// NOTE: Don't forget to update `dependentLibraryMaterials` in `markdown-engine/index.ts`

dependencies/mermaid/mermaid.min.js

+206-201
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "crossnote",
3-
"version": "0.9.5",
3+
"version": "0.9.6",
44
"description": "A powerful markdown notebook tool",
55
"keywords": [
66
"markdown"

src/markdown-engine/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ window["initRevealPresentation"] = async function() {
809809
'./dependencies/mermaid/mermaid.min.js',
810810
)}" charset="UTF-8"></script>`;
811811
} else {
812-
mermaidScript = `<script src="https://${this.notebook.config.jsdelivrCdnHost}/npm/mermaid@10.5.0/dist/mermaid.min.js"></script>`;
812+
mermaidScript = `<script src="https://${this.notebook.config.jsdelivrCdnHost}/npm/mermaid@10.6.0/dist/mermaid.min.js"></script>`;
813813
}
814814

815815
mermaidInitScript += `<script type="module">

src/markdown-engine/transformer.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,9 @@ export async function transformMarkdown(
965965
} else {
966966
outputString =
967967
outputString +
968-
`![@embedding](${filePath}){${stringifyBlockAttributes({
968+
`![@embedding](${encodeURIComponent(
969+
filePath,
970+
)}){${stringifyBlockAttributes({
969971
...config,
970972
embedding: btoa(encodeURIComponent(output)),
971973
})}}` +
@@ -984,7 +986,9 @@ export async function transformMarkdown(
984986
} else {
985987
outputString =
986988
outputString +
987-
`![@embedding](${filePath}){${stringifyBlockAttributes({
989+
`![@embedding](${encodeURIComponent(
990+
filePath,
991+
)}){${stringifyBlockAttributes({
988992
...config,
989993
error: btoa(encodeURIComponent(output)),
990994
})}}` +

0 commit comments

Comments
 (0)