@shikijs/transformers 2.3.2 → 2.4.1
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 +5 -5
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -70,7 +70,7 @@ function matchToken(text, isLast) {
|
|
|
70
70
|
return [
|
|
71
71
|
" ".repeat(spaceFront) + result[1],
|
|
72
72
|
result[2],
|
|
73
|
-
result[3] ? result[3] + " ".repeat(spaceEnd) :
|
|
73
|
+
result[3] ? result[3] + " ".repeat(spaceEnd) : void 0
|
|
74
74
|
];
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -232,7 +232,7 @@ function escapeRegExp(str) {
|
|
|
232
232
|
function transformerNotationMap(options = {}, name = "@shikijs/transformers:notation-map") {
|
|
233
233
|
const {
|
|
234
234
|
classMap = {},
|
|
235
|
-
classActivePre =
|
|
235
|
+
classActivePre = void 0
|
|
236
236
|
} = options;
|
|
237
237
|
return createCommentNotationTransformer(
|
|
238
238
|
name,
|
|
@@ -374,9 +374,9 @@ function separateToken(span, textNode, index, len) {
|
|
|
374
374
|
]
|
|
375
375
|
});
|
|
376
376
|
return [
|
|
377
|
-
index > 0 ? createNode(text.slice(0, index)) :
|
|
377
|
+
index > 0 ? createNode(text.slice(0, index)) : void 0,
|
|
378
378
|
createNode(text.slice(index, index + len)),
|
|
379
|
-
index + len < text.length ? createNode(text.slice(index + len)) :
|
|
379
|
+
index + len < text.length ? createNode(text.slice(index + len)) : void 0
|
|
380
380
|
];
|
|
381
381
|
}
|
|
382
382
|
function inheritElement(original, overrides) {
|
|
@@ -392,7 +392,7 @@ function inheritElement(original, overrides) {
|
|
|
392
392
|
function transformerNotationWordHighlight(options = {}) {
|
|
393
393
|
const {
|
|
394
394
|
classActiveWord = "highlighted-word",
|
|
395
|
-
classActivePre =
|
|
395
|
+
classActivePre = void 0
|
|
396
396
|
} = options;
|
|
397
397
|
return createCommentNotationTransformer(
|
|
398
398
|
"@shikijs/transformers:notation-highlight-word",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/transformers",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.1",
|
|
5
5
|
"description": "Collective of common transformers transformers for Shiki",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@shikijs/
|
|
34
|
-
"@shikijs/
|
|
33
|
+
"@shikijs/types": "2.4.1",
|
|
34
|
+
"@shikijs/core": "2.4.1"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "unbuild",
|