@shikijs/rehype 1.22.0 → 1.22.2
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/core.mjs +2 -1
- package/dist/index.mjs +1 -0
- package/package.json +4 -4
package/dist/core.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isSpecialLang } from 'shiki/core';
|
|
1
2
|
import { visit } from 'unist-util-visit';
|
|
2
3
|
import { toString } from 'hast-util-to-string';
|
|
3
4
|
|
|
@@ -92,7 +93,7 @@ function rehypeShikiFromHighlighter(highlighter, options) {
|
|
|
92
93
|
function getLanguage(lang) {
|
|
93
94
|
if (!lang)
|
|
94
95
|
return defaultLanguage;
|
|
95
|
-
if (highlighter.getLoadedLanguages().includes(lang))
|
|
96
|
+
if (highlighter.getLoadedLanguages().includes(lang) || isSpecialLang(lang))
|
|
96
97
|
return lang;
|
|
97
98
|
if (lazy) {
|
|
98
99
|
languageQueue.push(lang);
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/rehype",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.22.
|
|
4
|
+
"version": "1.22.2",
|
|
5
5
|
"description": "rehype integration for shiki",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
"hast-util-to-string": "^3.0.1",
|
|
50
50
|
"unified": "^11.0.5",
|
|
51
51
|
"unist-util-visit": "^5.0.0",
|
|
52
|
-
"
|
|
53
|
-
"
|
|
52
|
+
"@shikijs/types": "1.22.2",
|
|
53
|
+
"shiki": "1.22.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"rehype-raw": "^7.0.0",
|
|
57
57
|
"rehype-stringify": "^10.0.1",
|
|
58
58
|
"remark-parse": "^11.0.0",
|
|
59
59
|
"remark-rehype": "^11.1.1",
|
|
60
|
-
"@shikijs/transformers": "1.22.
|
|
60
|
+
"@shikijs/transformers": "1.22.2"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "unbuild",
|