@shikijs/vitepress-twoslash 1.2.4 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +14 -8
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -135,14 +135,20 @@ function renderMarkdown(md) {
|
|
|
135
135
|
code: (state, node) => {
|
|
136
136
|
const lang = node.lang || "";
|
|
137
137
|
if (lang) {
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
return {
|
|
139
|
+
type: "element",
|
|
140
|
+
tagName: "code",
|
|
141
|
+
properties: {},
|
|
142
|
+
children: this.codeToHast(
|
|
143
|
+
node.value,
|
|
144
|
+
{
|
|
145
|
+
...this.options,
|
|
146
|
+
transformers: [],
|
|
147
|
+
lang,
|
|
148
|
+
structure: "inline"
|
|
149
|
+
}
|
|
150
|
+
).children
|
|
151
|
+
};
|
|
146
152
|
}
|
|
147
153
|
return defaultHandlers.code(state, node);
|
|
148
154
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/vitepress-twoslash",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"description": "Enable Twoslash support in VitePress",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"mdast-util-to-hast": "^13.1.0",
|
|
55
55
|
"twoslash": "^0.2.5",
|
|
56
56
|
"twoslash-vue": "^0.2.5",
|
|
57
|
-
"vue": "^3.4.
|
|
58
|
-
"
|
|
59
|
-
"
|
|
57
|
+
"vue": "^3.4.26",
|
|
58
|
+
"shiki": "1.4.0",
|
|
59
|
+
"@shikijs/twoslash": "1.4.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "unbuild",
|