Skip to content

Commit d591ed2

Browse files
committed
refactor: improve Shiki renderer initialization and theme handling
- Added disposal logic for the highlighter and renderer when handling Mermaid blocks. - Enhanced the `ensureStreamMarkdownLoaded` function to register themes and update code more efficiently. - Modified `initRenderer` to ensure proper initialization and disposal of resources. - Updated theme registration to reactively watch for changes in props.themes. - Cleaned up redundant checks and streamlined the code for better readability and performance.
1 parent 388fb4d commit d591ed2

File tree

4 files changed

+770
-1034
lines changed

4 files changed

+770
-1034
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"katex": ">=0.16.22",
7777
"mermaid": ">=11",
7878
"shiki": "^3.13.0",
79-
"stream-markdown": ">=0.0.6",
79+
"stream-markdown": ">=0.0.8",
8080
"stream-monaco": ">=0.0.2",
8181
"vue": ">=3.0.0",
8282
"vue-i18n": ">=9"

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@tailwindcss/typography": "^0.5.19",
1616
"@vueuse/core": "^13.9.0",
1717
"katex": "^0.16.25",
18-
"stream-markdown": "^0.0.6",
18+
"stream-markdown": "^0.0.8",
1919
"stream-monaco": "^0.0.2",
2020
"vite": "^7.1.12",
2121
"vue": "^3.5.22",

0 commit comments

Comments
 (0)