Skip to content

Commit 44f1e72

Browse files
committedJan 24, 2025·
feat(plugin-shiki): use matchAlgorithm: v3
1 parent 108c888 commit 44f1e72

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed
 

‎plugins/markdown/plugin-shiki/src/node/transformers/getTransformers.ts

+21-4
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,45 @@ export const getTransformers = (
2424
const transformers: ShikiTransformer[] = []
2525

2626
if (options.notationDiff) {
27-
transformers.push(transformerNotationDiff())
27+
transformers.push(
28+
transformerNotationDiff({
29+
matchAlgorithm: 'v3',
30+
}),
31+
)
2832
}
2933

3034
if (options.notationFocus) {
3135
transformers.push(
3236
transformerNotationFocus({
3337
classActiveLine: 'has-focus',
3438
classActivePre: 'has-focused-lines',
39+
matchAlgorithm: 'v3',
3540
}),
3641
)
3742
}
3843

3944
if (options.notationHighlight) {
40-
transformers.push(transformerNotationHighlight())
45+
transformers.push(
46+
transformerNotationHighlight({
47+
matchAlgorithm: 'v3',
48+
}),
49+
)
4150
}
4251

4352
if (options.notationErrorLevel) {
44-
transformers.push(transformerNotationErrorLevel())
53+
transformers.push(
54+
transformerNotationErrorLevel({
55+
matchAlgorithm: 'v3',
56+
}),
57+
)
4558
}
4659

4760
if (options.notationWordHighlight) {
48-
transformers.push(transformerNotationWordHighlight())
61+
transformers.push(
62+
transformerNotationWordHighlight({
63+
matchAlgorithm: 'v3',
64+
}),
65+
)
4966
transformers.push(transformerMetaWordHighlight())
5067
}
5168

0 commit comments

Comments
 (0)
Please sign in to comment.