@shikijs/transformers 1.22.1 → 1.23.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.d.mts +49 -21
- package/dist/index.d.ts +49 -21
- package/dist/index.mjs +141 -65
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -13,6 +13,34 @@ interface TransformerCompactLineOption {
|
|
|
13
13
|
*/
|
|
14
14
|
declare function transformerCompactLineOptions(lineOptions?: TransformerCompactLineOption[]): ShikiTransformer;
|
|
15
15
|
|
|
16
|
+
declare function parseMetaHighlightString(meta: string): number[] | null;
|
|
17
|
+
interface TransformerMetaHighlightOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Class for highlighted lines
|
|
20
|
+
*
|
|
21
|
+
* @default 'highlighted'
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Allow using `{1,3-5}` in the code snippet meta to mark highlighted lines.
|
|
27
|
+
*/
|
|
28
|
+
declare function transformerMetaHighlight(options?: TransformerMetaHighlightOptions): ShikiTransformer;
|
|
29
|
+
|
|
30
|
+
declare function parseMetaHighlightWords(meta: string): string[];
|
|
31
|
+
interface TransformerMetaWordHighlightOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Class for highlighted words
|
|
34
|
+
*
|
|
35
|
+
* @default 'highlighted-word'
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Allow using `/word/` in the code snippet meta to mark highlighted words.
|
|
41
|
+
*/
|
|
42
|
+
declare function transformerMetaWordHighlight(options?: TransformerMetaWordHighlightOptions): ShikiTransformer;
|
|
43
|
+
|
|
16
44
|
interface TransformerNotationDiffOptions {
|
|
17
45
|
/**
|
|
18
46
|
* Class for added lines
|
|
@@ -124,34 +152,34 @@ interface TransformerRenderWhitespaceOptions {
|
|
|
124
152
|
*/
|
|
125
153
|
declare function transformerRenderWhitespace(options?: TransformerRenderWhitespaceOptions): ShikiTransformer;
|
|
126
154
|
|
|
127
|
-
|
|
128
|
-
interface TransformerMetaHighlightOptions {
|
|
155
|
+
interface TransformerStyleToClassOptions {
|
|
129
156
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* @default 'highlighted'
|
|
157
|
+
* Prefix for class names.
|
|
158
|
+
* @default '__shiki_'
|
|
133
159
|
*/
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Allow using `{1,3-5}` in the code snippet meta to mark highlighted lines.
|
|
138
|
-
*/
|
|
139
|
-
declare function transformerMetaHighlight(options?: TransformerMetaHighlightOptions): ShikiTransformer;
|
|
140
|
-
|
|
141
|
-
declare function parseMetaHighlightWords(meta: string): string[];
|
|
142
|
-
interface TransformerMetaWordHighlightOptions {
|
|
160
|
+
classPrefix?: string;
|
|
143
161
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @default 'highlighted-word'
|
|
162
|
+
* Suffix for class names.
|
|
163
|
+
* @default ''
|
|
147
164
|
*/
|
|
148
|
-
|
|
165
|
+
classSuffix?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Callback to replace class names.
|
|
168
|
+
* @default (className) => className
|
|
169
|
+
*/
|
|
170
|
+
classReplacer?: (className: string) => string;
|
|
171
|
+
}
|
|
172
|
+
interface ShikiTransformerStyleToClass extends ShikiTransformer {
|
|
173
|
+
getClassRegistry: () => Map<string, Record<string, string> | string>;
|
|
174
|
+
getCSS: () => string;
|
|
175
|
+
clearRegistry: () => void;
|
|
149
176
|
}
|
|
150
177
|
/**
|
|
151
|
-
*
|
|
178
|
+
* Remove line breaks between lines.
|
|
179
|
+
* Useful when you override `display: block` to `.line` in CSS.
|
|
152
180
|
*/
|
|
153
|
-
declare function
|
|
181
|
+
declare function transformerStyleToClass(options?: TransformerStyleToClassOptions): ShikiTransformerStyleToClass;
|
|
154
182
|
|
|
155
183
|
declare function createCommentNotationTransformer(name: string, regex: RegExp, onMatch: (this: ShikiTransformerContext, match: string[], line: Element, commentNode: Element, lines: Element[], index: number) => boolean, removeEmptyLines?: boolean): ShikiTransformer;
|
|
156
184
|
|
|
157
|
-
export { type TransformerCompactLineOption, type TransformerMetaHighlightOptions, type TransformerMetaWordHighlightOptions, type TransformerNotationDiffOptions, type TransformerNotationErrorLevelOptions, type TransformerNotationFocusOptions, type TransformerNotationHighlightOptions, type TransformerNotationWordHighlightOptions, type TransformerRenderWhitespaceOptions, createCommentNotationTransformer, parseMetaHighlightString, parseMetaHighlightWords, transformerCompactLineOptions, transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveLineBreak, transformerRemoveNotationEscape, transformerRenderWhitespace };
|
|
185
|
+
export { type ShikiTransformerStyleToClass, type TransformerCompactLineOption, type TransformerMetaHighlightOptions, type TransformerMetaWordHighlightOptions, type TransformerNotationDiffOptions, type TransformerNotationErrorLevelOptions, type TransformerNotationFocusOptions, type TransformerNotationHighlightOptions, type TransformerNotationWordHighlightOptions, type TransformerRenderWhitespaceOptions, type TransformerStyleToClassOptions, createCommentNotationTransformer, parseMetaHighlightString, parseMetaHighlightWords, transformerCompactLineOptions, transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveLineBreak, transformerRemoveNotationEscape, transformerRenderWhitespace, transformerStyleToClass };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,34 @@ interface TransformerCompactLineOption {
|
|
|
13
13
|
*/
|
|
14
14
|
declare function transformerCompactLineOptions(lineOptions?: TransformerCompactLineOption[]): ShikiTransformer;
|
|
15
15
|
|
|
16
|
+
declare function parseMetaHighlightString(meta: string): number[] | null;
|
|
17
|
+
interface TransformerMetaHighlightOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Class for highlighted lines
|
|
20
|
+
*
|
|
21
|
+
* @default 'highlighted'
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Allow using `{1,3-5}` in the code snippet meta to mark highlighted lines.
|
|
27
|
+
*/
|
|
28
|
+
declare function transformerMetaHighlight(options?: TransformerMetaHighlightOptions): ShikiTransformer;
|
|
29
|
+
|
|
30
|
+
declare function parseMetaHighlightWords(meta: string): string[];
|
|
31
|
+
interface TransformerMetaWordHighlightOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Class for highlighted words
|
|
34
|
+
*
|
|
35
|
+
* @default 'highlighted-word'
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Allow using `/word/` in the code snippet meta to mark highlighted words.
|
|
41
|
+
*/
|
|
42
|
+
declare function transformerMetaWordHighlight(options?: TransformerMetaWordHighlightOptions): ShikiTransformer;
|
|
43
|
+
|
|
16
44
|
interface TransformerNotationDiffOptions {
|
|
17
45
|
/**
|
|
18
46
|
* Class for added lines
|
|
@@ -124,34 +152,34 @@ interface TransformerRenderWhitespaceOptions {
|
|
|
124
152
|
*/
|
|
125
153
|
declare function transformerRenderWhitespace(options?: TransformerRenderWhitespaceOptions): ShikiTransformer;
|
|
126
154
|
|
|
127
|
-
|
|
128
|
-
interface TransformerMetaHighlightOptions {
|
|
155
|
+
interface TransformerStyleToClassOptions {
|
|
129
156
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* @default 'highlighted'
|
|
157
|
+
* Prefix for class names.
|
|
158
|
+
* @default '__shiki_'
|
|
133
159
|
*/
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Allow using `{1,3-5}` in the code snippet meta to mark highlighted lines.
|
|
138
|
-
*/
|
|
139
|
-
declare function transformerMetaHighlight(options?: TransformerMetaHighlightOptions): ShikiTransformer;
|
|
140
|
-
|
|
141
|
-
declare function parseMetaHighlightWords(meta: string): string[];
|
|
142
|
-
interface TransformerMetaWordHighlightOptions {
|
|
160
|
+
classPrefix?: string;
|
|
143
161
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @default 'highlighted-word'
|
|
162
|
+
* Suffix for class names.
|
|
163
|
+
* @default ''
|
|
147
164
|
*/
|
|
148
|
-
|
|
165
|
+
classSuffix?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Callback to replace class names.
|
|
168
|
+
* @default (className) => className
|
|
169
|
+
*/
|
|
170
|
+
classReplacer?: (className: string) => string;
|
|
171
|
+
}
|
|
172
|
+
interface ShikiTransformerStyleToClass extends ShikiTransformer {
|
|
173
|
+
getClassRegistry: () => Map<string, Record<string, string> | string>;
|
|
174
|
+
getCSS: () => string;
|
|
175
|
+
clearRegistry: () => void;
|
|
149
176
|
}
|
|
150
177
|
/**
|
|
151
|
-
*
|
|
178
|
+
* Remove line breaks between lines.
|
|
179
|
+
* Useful when you override `display: block` to `.line` in CSS.
|
|
152
180
|
*/
|
|
153
|
-
declare function
|
|
181
|
+
declare function transformerStyleToClass(options?: TransformerStyleToClassOptions): ShikiTransformerStyleToClass;
|
|
154
182
|
|
|
155
183
|
declare function createCommentNotationTransformer(name: string, regex: RegExp, onMatch: (this: ShikiTransformerContext, match: string[], line: Element, commentNode: Element, lines: Element[], index: number) => boolean, removeEmptyLines?: boolean): ShikiTransformer;
|
|
156
184
|
|
|
157
|
-
export { type TransformerCompactLineOption, type TransformerMetaHighlightOptions, type TransformerMetaWordHighlightOptions, type TransformerNotationDiffOptions, type TransformerNotationErrorLevelOptions, type TransformerNotationFocusOptions, type TransformerNotationHighlightOptions, type TransformerNotationWordHighlightOptions, type TransformerRenderWhitespaceOptions, createCommentNotationTransformer, parseMetaHighlightString, parseMetaHighlightWords, transformerCompactLineOptions, transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveLineBreak, transformerRemoveNotationEscape, transformerRenderWhitespace };
|
|
185
|
+
export { type ShikiTransformerStyleToClass, type TransformerCompactLineOption, type TransformerMetaHighlightOptions, type TransformerMetaWordHighlightOptions, type TransformerNotationDiffOptions, type TransformerNotationErrorLevelOptions, type TransformerNotationFocusOptions, type TransformerNotationHighlightOptions, type TransformerNotationWordHighlightOptions, type TransformerRenderWhitespaceOptions, type TransformerStyleToClassOptions, createCommentNotationTransformer, parseMetaHighlightString, parseMetaHighlightWords, transformerCompactLineOptions, transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveLineBreak, transformerRemoveNotationEscape, transformerRenderWhitespace, transformerStyleToClass };
|
package/dist/index.mjs
CHANGED
|
@@ -10,6 +10,82 @@ function transformerCompactLineOptions(lineOptions = []) {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
function parseMetaHighlightString(meta) {
|
|
14
|
+
if (!meta)
|
|
15
|
+
return null;
|
|
16
|
+
const match = meta.match(/\{([\d,-]+)\}/);
|
|
17
|
+
if (!match)
|
|
18
|
+
return null;
|
|
19
|
+
const lines = match[1].split(",").flatMap((v) => {
|
|
20
|
+
const num = v.split("-").map((v2) => Number.parseInt(v2, 10));
|
|
21
|
+
if (num.length === 1)
|
|
22
|
+
return [num[0]];
|
|
23
|
+
else
|
|
24
|
+
return Array.from({ length: num[1] - num[0] + 1 }, (_, i) => i + num[0]);
|
|
25
|
+
});
|
|
26
|
+
return lines;
|
|
27
|
+
}
|
|
28
|
+
const symbol = Symbol("highlighted-lines");
|
|
29
|
+
function transformerMetaHighlight(options = {}) {
|
|
30
|
+
const {
|
|
31
|
+
className = "highlighted"
|
|
32
|
+
} = options;
|
|
33
|
+
return {
|
|
34
|
+
name: "@shikijs/transformers:meta-highlight",
|
|
35
|
+
line(node, line) {
|
|
36
|
+
var _a;
|
|
37
|
+
if (!this.options.meta?.__raw) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
(_a = this.meta)[symbol] || (_a[symbol] = parseMetaHighlightString(this.options.meta.__raw));
|
|
41
|
+
const lines = this.meta[symbol] || [];
|
|
42
|
+
if (lines.includes(line))
|
|
43
|
+
this.addClassToHast(node, className);
|
|
44
|
+
return node;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function parseMetaHighlightWords(meta) {
|
|
50
|
+
if (!meta)
|
|
51
|
+
return [];
|
|
52
|
+
const match = Array.from(meta.matchAll(/\/((?:\\.|[^/])+)\//g));
|
|
53
|
+
return match.map((v) => v[1].replace(/\\(.)/g, "$1"));
|
|
54
|
+
}
|
|
55
|
+
function transformerMetaWordHighlight(options = {}) {
|
|
56
|
+
const {
|
|
57
|
+
className = "highlighted-word"
|
|
58
|
+
} = options;
|
|
59
|
+
return {
|
|
60
|
+
name: "@shikijs/transformers:meta-word-highlight",
|
|
61
|
+
preprocess(code, options2) {
|
|
62
|
+
if (!this.options.meta?.__raw)
|
|
63
|
+
return;
|
|
64
|
+
const words = parseMetaHighlightWords(this.options.meta.__raw);
|
|
65
|
+
options2.decorations || (options2.decorations = []);
|
|
66
|
+
for (const word of words) {
|
|
67
|
+
const indexes = findAllSubstringIndexes(code, word);
|
|
68
|
+
for (const index of indexes) {
|
|
69
|
+
options2.decorations.push({
|
|
70
|
+
start: index,
|
|
71
|
+
end: index + word.length,
|
|
72
|
+
properties: {
|
|
73
|
+
class: className
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function findAllSubstringIndexes(str, substr) {
|
|
82
|
+
const indexes = [];
|
|
83
|
+
let i = -1;
|
|
84
|
+
while ((i = str.indexOf(substr, i + 1)) !== -1)
|
|
85
|
+
indexes.push(i);
|
|
86
|
+
return indexes;
|
|
87
|
+
}
|
|
88
|
+
|
|
13
89
|
function createCommentNotationTransformer(name, regex, onMatch, removeEmptyLines = false) {
|
|
14
90
|
return {
|
|
15
91
|
name,
|
|
@@ -364,80 +440,80 @@ function transformerRenderWhitespace(options = {}) {
|
|
|
364
440
|
};
|
|
365
441
|
}
|
|
366
442
|
|
|
367
|
-
function
|
|
368
|
-
if (!meta)
|
|
369
|
-
return null;
|
|
370
|
-
const match = meta.match(/\{([\d,-]+)\}/);
|
|
371
|
-
if (!match)
|
|
372
|
-
return null;
|
|
373
|
-
const lines = match[1].split(",").flatMap((v) => {
|
|
374
|
-
const num = v.split("-").map((v2) => Number.parseInt(v2, 10));
|
|
375
|
-
if (num.length === 1)
|
|
376
|
-
return [num[0]];
|
|
377
|
-
else
|
|
378
|
-
return Array.from({ length: num[1] - num[0] + 1 }, (_, i) => i + num[0]);
|
|
379
|
-
});
|
|
380
|
-
return lines;
|
|
381
|
-
}
|
|
382
|
-
const symbol = Symbol("highlighted-lines");
|
|
383
|
-
function transformerMetaHighlight(options = {}) {
|
|
443
|
+
function transformerStyleToClass(options = {}) {
|
|
384
444
|
const {
|
|
385
|
-
|
|
445
|
+
classPrefix = "__shiki_",
|
|
446
|
+
classSuffix = "",
|
|
447
|
+
classReplacer = (className) => className
|
|
386
448
|
} = options;
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
449
|
+
const classToStyle = /* @__PURE__ */ new Map();
|
|
450
|
+
function stringifyStyle(style) {
|
|
451
|
+
return Object.entries(style).map(([key, value]) => `${key}:${value}`).join(";");
|
|
452
|
+
}
|
|
453
|
+
function registerStyle(style) {
|
|
454
|
+
const str = typeof style === "string" ? style : stringifyStyle(style);
|
|
455
|
+
let className = classPrefix + cyrb53(str) + classSuffix;
|
|
456
|
+
className = classReplacer(className);
|
|
457
|
+
if (!classToStyle.has(className)) {
|
|
458
|
+
classToStyle.set(
|
|
459
|
+
className,
|
|
460
|
+
typeof style === "string" ? style : { ...style }
|
|
461
|
+
);
|
|
399
462
|
}
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
function parseMetaHighlightWords(meta) {
|
|
404
|
-
if (!meta)
|
|
405
|
-
return [];
|
|
406
|
-
const match = Array.from(meta.matchAll(/\/((?:\\.|[^/])+)\//g));
|
|
407
|
-
return match.map((v) => v[1].replace(/\\(.)/g, "$1"));
|
|
408
|
-
}
|
|
409
|
-
function transformerMetaWordHighlight(options = {}) {
|
|
410
|
-
const {
|
|
411
|
-
className = "highlighted-word"
|
|
412
|
-
} = options;
|
|
463
|
+
return className;
|
|
464
|
+
}
|
|
413
465
|
return {
|
|
414
|
-
name: "@shikijs/transformers:
|
|
415
|
-
|
|
416
|
-
if (!
|
|
466
|
+
name: "@shikijs/transformers:style-to-class",
|
|
467
|
+
pre(t) {
|
|
468
|
+
if (!t.properties.style)
|
|
417
469
|
return;
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
});
|
|
470
|
+
const className = registerStyle(t.properties.style);
|
|
471
|
+
delete t.properties.style;
|
|
472
|
+
this.addClassToHast(t, className);
|
|
473
|
+
},
|
|
474
|
+
tokens(lines) {
|
|
475
|
+
for (const line of lines) {
|
|
476
|
+
for (const token of line) {
|
|
477
|
+
if (!token.htmlStyle)
|
|
478
|
+
continue;
|
|
479
|
+
const className = registerStyle(token.htmlStyle);
|
|
480
|
+
token.htmlStyle = {};
|
|
481
|
+
token.htmlAttrs || (token.htmlAttrs = {});
|
|
482
|
+
if (!token.htmlAttrs.class)
|
|
483
|
+
token.htmlAttrs.class = className;
|
|
484
|
+
else
|
|
485
|
+
token.htmlAttrs.class += ` ${className}`;
|
|
430
486
|
}
|
|
431
487
|
}
|
|
488
|
+
},
|
|
489
|
+
getClassRegistry() {
|
|
490
|
+
return classToStyle;
|
|
491
|
+
},
|
|
492
|
+
getCSS() {
|
|
493
|
+
let css = "";
|
|
494
|
+
for (const [className, style] of classToStyle.entries()) {
|
|
495
|
+
css += `.${className}{${typeof style === "string" ? style : stringifyStyle(style)}}`;
|
|
496
|
+
}
|
|
497
|
+
return css;
|
|
498
|
+
},
|
|
499
|
+
clearRegistry() {
|
|
500
|
+
classToStyle.clear();
|
|
432
501
|
}
|
|
433
502
|
};
|
|
434
503
|
}
|
|
435
|
-
function
|
|
436
|
-
|
|
437
|
-
let
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
504
|
+
function cyrb53(str, seed = 0) {
|
|
505
|
+
let h1 = 3735928559 ^ seed;
|
|
506
|
+
let h2 = 1103547991 ^ seed;
|
|
507
|
+
for (let i = 0, ch; i < str.length; i++) {
|
|
508
|
+
ch = str.charCodeAt(i);
|
|
509
|
+
h1 = Math.imul(h1 ^ ch, 2654435761);
|
|
510
|
+
h2 = Math.imul(h2 ^ ch, 1597334677);
|
|
511
|
+
}
|
|
512
|
+
h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507);
|
|
513
|
+
h1 ^= Math.imul(h2 ^ h2 >>> 13, 3266489909);
|
|
514
|
+
h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507);
|
|
515
|
+
h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
|
|
516
|
+
return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(36).slice(0, 6);
|
|
441
517
|
}
|
|
442
518
|
|
|
443
|
-
export { createCommentNotationTransformer, parseMetaHighlightString, parseMetaHighlightWords, transformerCompactLineOptions, transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveLineBreak, transformerRemoveNotationEscape, transformerRenderWhitespace };
|
|
519
|
+
export { createCommentNotationTransformer, parseMetaHighlightString, parseMetaHighlightWords, transformerCompactLineOptions, transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveLineBreak, transformerRemoveNotationEscape, transformerRenderWhitespace, transformerStyleToClass };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/transformers",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.23.0",
|
|
5
5
|
"description": "Collective of common transformers transformers for Shiki",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"shiki": "1.
|
|
33
|
+
"shiki": "1.23.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "unbuild",
|