Skip to content

Commit 75f18e4

Browse files
authoredNov 23, 2023
feat: migrate to shikiji (#3237)
1 parent 46966ac commit 75f18e4

File tree

10 files changed

+486
-208
lines changed

10 files changed

+486
-208
lines changed
 

‎__tests__/e2e/markdown-extensions/markdown-extensions.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -163,19 +163,19 @@ describe('Line Numbers', () => {
163163
describe('Import Code Snippets', () => {
164164
test('basic', async () => {
165165
const lines = page.locator('#basic-code-snippet + div code > span')
166-
expect(await lines.count()).toBe(22)
166+
expect(await lines.count()).toBe(11)
167167
})
168168

169169
test('specify region', async () => {
170170
const lines = page.locator('#specify-region + div code > span')
171-
expect(await lines.count()).toBe(6)
171+
expect(await lines.count()).toBe(3)
172172
})
173173

174174
test('with other features', async () => {
175175
const div = page.locator('#with-other-features + div')
176176
expect(await getClassList(div)).toContain('line-numbers-mode')
177177
const lines = div.locator('code > span')
178-
expect(await lines.count()).toBe(6)
178+
expect(await lines.count()).toBe(3)
179179
expect(await getClassList(lines.nth(0))).toContain('highlighted')
180180
})
181181
})
@@ -216,10 +216,10 @@ describe('Code Groups', () => {
216216

217217
// blocks
218218
const blocks = div.locator('.blocks > div')
219-
expect(await blocks.nth(0).locator('code > span').count()).toBe(22)
219+
expect(await blocks.nth(0).locator('code > span').count()).toBe(11)
220220
expect(await getClassList(blocks.nth(1))).toContain('line-numbers-mode')
221221
expect(await getClassList(blocks.nth(1))).toContain('language-ts')
222-
expect(await blocks.nth(1).locator('code > span').count()).toBe(6)
222+
expect(await blocks.nth(1).locator('code > span').count()).toBe(3)
223223
expect(
224224
await getClassList(blocks.nth(1).locator('code > span').nth(0))
225225
).toContain('highlighted')

‎docs/.vitepress/config.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ export default defineConfig({
1313
cleanUrls: true,
1414

1515
markdown: {
16-
math: true
16+
math: true,
17+
codeTransformers: [
18+
// We use `[!!code` in demo to prevent transformation, here we revert it back.
19+
{
20+
postprocess(code) {
21+
return code.replace(/\[\!\!code/g, '[!code')
22+
}
23+
}
24+
]
1725
},
1826

1927
sitemap: {

‎docs/guide/markdown.md

+10-16
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ For more details, see [Frontmatter](../reference/frontmatter-config).
8080

8181
**Input**
8282

83-
```
83+
```md
8484
| Tables | Are | Cool |
8585
| ------------- | :-----------: | ----: |
8686
| col 3 is | right-aligned | $1600 |
@@ -265,7 +265,7 @@ Wraps in a <div class="vp-raw">
265265

266266
## Syntax Highlighting in Code Blocks
267267

268-
VitePress uses [Shiki](https://shiki.matsu.io/) to highlight language syntax in Markdown code blocks, using coloured text. Shiki supports a wide variety of programming languages. All you need to do is append a valid language alias to the beginning backticks for the code block:
268+
VitePress uses [Shikiji](https://github.com/antfu/shikiji) (an improved version of [Shiki](https://shiki.matsu.io/)) to highlight language syntax in Markdown code blocks, using coloured text. Shiki supports a wide variety of programming languages. All you need to do is append a valid language alias to the beginning backticks for the code block:
269269

270270
**Input**
271271

@@ -377,7 +377,7 @@ export default { // Highlighted
377377
}
378378
```
379379

380-
Alternatively, it's possible to highlight directly in the line by using the `// [!code hl]` comment.
380+
Alternatively, it's possible to highlight directly in the line by using the `// [!code hightlight]` comment.
381381

382382
**Input**
383383

@@ -386,7 +386,7 @@ Alternatively, it's possible to highlight directly in the line by using the `//
386386
export default {
387387
data () {
388388
return {
389-
msg: 'Highlighted!' // [!code hl]
389+
msg: 'Highlighted!' // [!!code highlight]
390390
}
391391
}
392392
}
@@ -399,7 +399,7 @@ export default {
399399
export default {
400400
data() {
401401
return {
402-
msg: 'Highlighted!' // [!code hl]
402+
msg: 'Highlighted!' // [!code highlight]
403403
}
404404
}
405405
}
@@ -413,14 +413,12 @@ Additionally, you can define a number of lines to focus using `// [!code focus:<
413413

414414
**Input**
415415

416-
Note that only one space is required after `!code`, here are two to prevent processing.
417-
418416
````
419417
```js
420418
export default {
421419
data () {
422420
return {
423-
msg: 'Focused!' // [!code focus]
421+
msg: 'Focused!' // [!!code focus]
424422
}
425423
}
426424
}
@@ -445,15 +443,13 @@ Adding the `// [!code --]` or `// [!code ++]` comments on a line will create a d
445443

446444
**Input**
447445

448-
Note that only one space is required after `!code`, here are two to prevent processing.
449-
450446
````
451447
```js
452448
export default {
453449
data () {
454450
return {
455-
msg: 'Removed' // [!code --]
456-
msg: 'Added' // [!code ++]
451+
msg: 'Removed' // [!!code --]
452+
msg: 'Added' // [!!code ++]
457453
}
458454
}
459455
}
@@ -479,15 +475,13 @@ Adding the `// [!code warning]` or `// [!code error]` comments on a line will co
479475

480476
**Input**
481477

482-
Note that only one space is required after `!code`, here are two to prevent processing.
483-
484478
````
485479
```js
486480
export default {
487481
data () {
488482
return {
489-
msg: 'Error', // [!code error]
490-
msg: 'Warning' // [!code warning]
483+
msg: 'Error', // [!!code error]
484+
msg: 'Warning' // [!!code warning]
491485
}
492486
}
493487
}

‎docs/reference/site-config.md

+2-82
Original file line numberDiff line numberDiff line change
@@ -454,95 +454,15 @@ When using the default theme, enabling this option will display each page's last
454454

455455
- Type: `MarkdownOption`
456456

457-
Configure Markdown parser options. VitePress uses [Markdown-it](https://github.com/markdown-it/markdown-it) as the parser, and [Shiki](https://shiki.matsu.io/) to highlight language syntax. Inside this option, you may pass various Markdown related options to fit your needs.
457+
Configure Markdown parser options. VitePress uses [Markdown-it](https://github.com/markdown-it/markdown-it) as the parser, and [Shikiji](https://github.com/antfu/shikiji) (an improved version of [Shiki](https://shiki.matsu.io/)) to highlight language syntax. Inside this option, you may pass various Markdown related options to fit your needs.
458458

459459
```js
460460
export default {
461461
markdown: {...}
462462
}
463463
```
464464

465-
Below are all the options that you can have in this object:
466-
467-
```ts
468-
interface MarkdownOptions extends MarkdownIt.Options {
469-
// Custom theme for syntax highlighting.
470-
// You can use an existing theme.
471-
// See: https://github.com/shikijs/shiki/blob/main/docs/themes.md#all-themes
472-
// Or add your own theme.
473-
// See: https://github.com/shikijs/shiki/blob/main/docs/themes.md#loading-theme
474-
theme?:
475-
| Shiki.IThemeRegistration
476-
| { light: Shiki.IThemeRegistration; dark: Shiki.IThemeRegistration }
477-
478-
// Enable line numbers in code block.
479-
lineNumbers?: boolean
480-
481-
// Add support for your own languages.
482-
// https://github.com/shikijs/shiki/blob/main/docs/languages.md#supporting-your-own-languages-with-shiki
483-
languages?: Shiki.ILanguageRegistration[]
484-
485-
// markdown-it-anchor plugin options.
486-
// See: https://github.com/valeriangalliat/markdown-it-anchor#usage
487-
anchor?: anchorPlugin.AnchorOptions
488-
489-
// markdown-it-attrs plugin options.
490-
// See: https://github.com/arve0/markdown-it-attrs
491-
attrs?: {
492-
leftDelimiter?: string
493-
rightDelimiter?: string
494-
allowedAttributes?: Array<string | RegExp>
495-
disable?: boolean
496-
}
497-
498-
// specify default language for syntax highlighter
499-
defaultHighlightLang?: string
500-
501-
// @mdit-vue/plugin-frontmatter plugin options.
502-
// See: https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter#options
503-
frontmatter?: FrontmatterPluginOptions
504-
505-
// @mdit-vue/plugin-headers plugin options.
506-
// See: https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-headers#options
507-
headers?: HeadersPluginOptions | boolean
508-
509-
// @mdit-vue/plugin-sfc plugin options.
510-
// See: https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-sfc#options
511-
sfc?: SfcPluginOptions
512-
513-
// @mdit-vue/plugin-toc plugin options.
514-
// See: https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-toc#options
515-
toc?: TocPluginOptions
516-
517-
// @mdit-vue/plugin-component plugin options.
518-
// See: https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-component#options
519-
component?: ComponentPluginOptions
520-
521-
// Configure the Markdown-it instance.
522-
config?: (md: MarkdownIt) => void
523-
524-
// Same as `config` but will be applied before all other plugins.
525-
preConfig?: (md: MarkdownIt) => void
526-
527-
// Disable cache (experimental)
528-
cache?: boolean
529-
530-
// Math support (experimental)
531-
// You need to install `markdown-it-mathjax3` and set `math` to `true` to enable it.
532-
// You can also pass options to `markdown-it-mathjax3` here.
533-
// See: https://github.com/tani/markdown-it-mathjax3#customization
534-
math?: boolean | any
535-
536-
// Global custom container titles
537-
container?: {
538-
infoLabel?: string
539-
tipLabel?: string
540-
warningLabel?: string
541-
dangerLabel?: string
542-
detailsLabel?: string
543-
}
544-
}
545-
```
465+
Check the [type declaration and jsdocs](https://github.com/vuejs/vitepress/blob/main/src/node/markdown/markdown.ts) for all the options available.
546466

547467
### vite
548468

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@
101101
"mark.js": "8.11.1",
102102
"minisearch": "^6.2.0",
103103
"mrmime": "^1.0.1",
104-
"shiki": "^0.14.5",
104+
"shikiji": "^0.7.2",
105+
"shikiji-transformers": "^0.7.2",
105106
"vite": "^5.0.0",
106107
"vue": "^3.3.8"
107108
},
@@ -187,7 +188,6 @@
187188
"rollup-plugin-dts": "^6.1.0",
188189
"rollup-plugin-esbuild": "^6.1.0",
189190
"semver": "^7.5.4",
190-
"shiki-processor": "^0.1.3",
191191
"simple-git-hooks": "^2.9.0",
192192
"sirv": "^2.0.3",
193193
"sitemap": "^7.1.1",

‎pnpm-lock.yaml

+281-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.dark .vp-code-light {
2-
display: none;
1+
.dark .vp-code span {
2+
color: var(--shiki-dark, inherit);
33
}
44

5-
html:not(.dark) .vp-code-dark {
6-
display: none;
5+
html:not(.dark) .vp-code span {
6+
color: var(--shiki-light, inherit);
77
}

‎src/node/markdown/markdown.ts

+115-11
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import MarkdownIt from 'markdown-it'
1818
import anchorPlugin from 'markdown-it-anchor'
1919
import attrsPlugin from 'markdown-it-attrs'
2020
import emojiPlugin from 'markdown-it-emoji'
21-
import type { ILanguageRegistration, IThemeRegistration } from 'shiki'
2221
import type { Logger } from 'vite'
2322
import { containerPlugin, type ContainerOptions } from './plugins/containers'
2423
import { highlight } from './plugins/highlight'
@@ -28,36 +27,139 @@ import { lineNumberPlugin } from './plugins/lineNumbers'
2827
import { linkPlugin } from './plugins/link'
2928
import { preWrapperPlugin } from './plugins/preWrapper'
3029
import { snippetPlugin } from './plugins/snippet'
30+
import type {
31+
ThemeRegistration,
32+
BuiltinTheme,
33+
LanguageInput,
34+
ShikijiTransformer
35+
} from 'shikiji'
3136

3237
export type { Header } from '../shared'
3338

3439
export type ThemeOptions =
35-
| IThemeRegistration
36-
| { light: IThemeRegistration; dark: IThemeRegistration }
40+
| ThemeRegistration
41+
| BuiltinTheme
42+
| {
43+
light: ThemeRegistration | BuiltinTheme
44+
dark: ThemeRegistration | BuiltinTheme
45+
}
3746

3847
export interface MarkdownOptions extends MarkdownIt.Options {
39-
lineNumbers?: boolean
48+
/* ==================== General Options ==================== */
49+
50+
/**
51+
* Setup markdown-it instance before applying plugins
52+
*/
4053
preConfig?: (md: MarkdownIt) => void
54+
/**
55+
* Setup markdown-it instance
56+
*/
4157
config?: (md: MarkdownIt) => void
58+
/**
59+
* Disable cache (experimental)
60+
*/
61+
cache?: boolean
62+
externalLinks?: Record<string, string>
63+
64+
/* ==================== Syntax Highlighting ==================== */
65+
66+
/**
67+
* Custom theme for syntax highlighting.
68+
*
69+
* You can also pass an object with `light` and `dark` themes to support dual themes.
70+
*
71+
* @example { theme: 'github-dark' }
72+
* @example { theme: { light: 'github-light', dark: 'github-dark' } }
73+
*
74+
* You can use an existing theme.
75+
* @see https://github.com/antfu/shikiji/blob/main/docs/themes.md#all-themes
76+
* Or add your own theme.
77+
* @see https://github.com/antfu/shikiji/blob/main/docs/themes.md#load-custom-themes
78+
*/
79+
theme?: ThemeOptions
80+
/**
81+
* Languages for syntax highlighting.
82+
* @see https://github.com/antfu/shikiji/blob/main/docs/languages.md#all-themes
83+
*/
84+
languages?: LanguageInput[]
85+
/**
86+
* Custom language aliases.
87+
*
88+
* @example { 'my-lang': 'js' }
89+
* @see https://github.com/antfu/shikiji/tree/main#custom-language-aliases
90+
*/
91+
languageAlias?: Record<string, string>
92+
/**
93+
* Show line numbers in code blocks
94+
* @default false
95+
*/
96+
lineNumbers?: boolean
97+
/**
98+
* Fallback language when the specified language is not available.
99+
*/
100+
defaultHighlightLang?: string
101+
/**
102+
* Transformers applied to code blocks
103+
* @see https://github.com/antfu/shikiji#hast-transformers
104+
*/
105+
codeTransformers?: ShikijiTransformer[]
106+
107+
/* ==================== Markdown It Plugins ==================== */
108+
109+
/**
110+
* Options for `markdown-it-anchor`
111+
* @see https://github.com/valeriangalliat/markdown-it-anchor
112+
*/
42113
anchor?: anchorPlugin.AnchorOptions
114+
/**
115+
* Options for `markdown-it-attrs`
116+
* @see https://github.com/arve0/markdown-it-attrs
117+
*/
43118
attrs?: {
44119
leftDelimiter?: string
45120
rightDelimiter?: string
46121
allowedAttributes?: Array<string | RegExp>
47122
disable?: boolean
48123
}
49-
defaultHighlightLang?: string
124+
/**
125+
* Options for `@mdit-vue/plugin-frontmatter`
126+
* @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter
127+
*/
50128
frontmatter?: FrontmatterPluginOptions
129+
/**
130+
* Options for `@mdit-vue/plugin-headers`
131+
* @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-headers
132+
*/
51133
headers?: HeadersPluginOptions | boolean
134+
/**
135+
* Options for `@mdit-vue/plugin-sfc`
136+
* @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-sfc
137+
*/
52138
sfc?: SfcPluginOptions
53-
theme?: ThemeOptions
54-
languages?: ILanguageRegistration[]
139+
/**
140+
* Options for `@mdit-vue/plugin-toc`
141+
* @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-toc
142+
*/
55143
toc?: TocPluginOptions
56-
externalLinks?: Record<string, string>
57-
cache?: boolean
144+
/**
145+
* Options for `@mdit-vue/plugin-component`
146+
* @see https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-component
147+
*/
58148
component?: ComponentPluginOptions
59-
math?: boolean | any
149+
/**
150+
* Options for `markdown-it-container`
151+
* @see https://github.com/markdown-it/markdown-it-container
152+
*/
60153
container?: ContainerOptions
154+
/**
155+
* Math support (experimental)
156+
*
157+
* You need to install `markdown-it-mathjax3` and set `math` to `true` to enable it.
158+
* You can also pass options to `markdown-it-mathjax3` here.
159+
* @default false
160+
* @see https://vitepress.dev/guide/markdown#math-equations
161+
*/
162+
math?: boolean | any
61163
}
62164

63165
export type MarkdownRenderer = MarkdownIt
@@ -80,7 +182,9 @@ export const createMarkdownRenderer = async (
80182
theme,
81183
options.languages,
82184
options.defaultHighlightLang,
83-
logger
185+
logger,
186+
options.codeTransformers,
187+
options.languageAlias
84188
)),
85189
...options
86190
})

‎src/node/markdown/plugins/highlight.ts

+56-58
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import { customAlphabet } from 'nanoid'
22
import c from 'picocolors'
3+
import type { LanguageInput, ShikijiTransformer } from 'shikiji'
34
import {
4-
BUNDLED_LANGUAGES,
5-
type HtmlRendererOptions,
6-
type ILanguageRegistration,
7-
type IThemeRegistration
8-
} from 'shiki'
9-
import {
10-
addClass,
11-
createDiffProcessor,
12-
createFocusProcessor,
13-
createHighlightProcessor,
14-
createRangeProcessor,
15-
defineProcessor,
5+
bundledLanguages,
166
getHighlighter,
17-
type Processor
18-
} from 'shiki-processor'
7+
addClassToHast,
8+
isPlaintext as isPlainLang,
9+
isSpecialLang
10+
} from 'shikiji'
1911
import type { Logger } from 'vite'
2012
import type { ThemeOptions } from '../markdown'
13+
import {
14+
transformerCompactLineOptions,
15+
transformerNotationDiff,
16+
transformerNotationErrorLevel,
17+
transformerNotationFocus,
18+
transformerNotationHighlight,
19+
type TransformerCompactLineOption
20+
} from 'shikiji-transformers'
2121

2222
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz', 10)
2323

@@ -29,7 +29,7 @@ const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz', 10)
2929
* 2. convert line numbers into line options:
3030
* [{ line: number, classes: string[] }]
3131
*/
32-
const attrsToLines = (attrs: string): HtmlRendererOptions['lineOptions'] => {
32+
const attrsToLines = (attrs: string): TransformerCompactLineOption[] => {
3333
attrs = attrs.replace(/^(?:\[.*?\])?.*?([\d,-]+).*/, '$1').trim()
3434
const result: number[] = []
3535
if (!attrs) {
@@ -53,37 +53,38 @@ const attrsToLines = (attrs: string): HtmlRendererOptions['lineOptions'] => {
5353
}))
5454
}
5555

56-
const errorLevelProcessor = defineProcessor({
57-
name: 'error-level',
58-
handler: createRangeProcessor({
59-
error: ['highlighted', 'error'],
60-
warning: ['highlighted', 'warning']
61-
})
62-
})
63-
6456
export async function highlight(
6557
theme: ThemeOptions,
66-
languages: ILanguageRegistration[] = [],
58+
languages?: LanguageInput[],
6759
defaultLang: string = '',
68-
logger: Pick<Logger, 'warn'> = console
60+
logger: Pick<Logger, 'warn'> = console,
61+
userTransformers: ShikijiTransformer[] = [],
62+
languageAlias: Record<string, string> = {}
6963
): Promise<(str: string, lang: string, attrs: string) => string> {
70-
const hasSingleTheme = typeof theme === 'string' || 'name' in theme
71-
const getThemeName = (themeValue: IThemeRegistration) =>
72-
typeof themeValue === 'string' ? themeValue : themeValue.name
73-
74-
const processors: Processor[] = [
75-
createFocusProcessor(),
76-
createHighlightProcessor({ hasHighlightClass: 'highlighted' }),
77-
createDiffProcessor(),
78-
errorLevelProcessor
79-
]
80-
8164
const highlighter = await getHighlighter({
82-
themes: hasSingleTheme ? [theme] : [theme.dark, theme.light],
83-
langs: [...BUNDLED_LANGUAGES, ...languages],
84-
processors
65+
themes:
66+
typeof theme === 'string' || 'name' in theme
67+
? [theme]
68+
: [theme.light, theme.dark],
69+
langs: languages?.length ? languages : Object.keys(bundledLanguages),
70+
langAlias: languageAlias
8571
})
8672

73+
const transformers: ShikijiTransformer[] = [
74+
transformerNotationDiff(),
75+
transformerNotationFocus({
76+
classActiveLine: 'has-focus',
77+
classActivePre: 'has-focused-lines'
78+
}),
79+
transformerNotationHighlight(),
80+
transformerNotationErrorLevel(),
81+
{
82+
pre(node) {
83+
addClassToHast(node, 'vp-code')
84+
}
85+
}
86+
]
87+
8788
const styleRE = /<pre[^>]*(style=".*?")/
8889
const preRE = /^<pre(.*?)>/
8990
const vueRE = /-vue$/
@@ -102,7 +103,7 @@ export async function highlight(
102103

103104
if (lang) {
104105
const langLoaded = highlighter.getLoadedLanguages().includes(lang as any)
105-
if (!langLoaded && !['ansi', 'plaintext', 'txt', 'text'].includes(lang)) {
106+
if (!langLoaded && !isPlainLang(lang) && !isSpecialLang(lang)) {
106107
logger.warn(
107108
c.yellow(
108109
`\nThe language '${lang}' is not loaded, falling back to '${
@@ -155,24 +156,21 @@ export async function highlight(
155156

156157
str = removeMustache(str).trimEnd()
157158

158-
const codeToHtml = (theme: IThemeRegistration) => {
159-
const res =
160-
lang === 'ansi'
161-
? highlighter.ansiToHtml(str, {
162-
lineOptions,
163-
theme: getThemeName(theme)
164-
})
165-
: highlighter.codeToHtml(str, {
166-
lang,
167-
lineOptions,
168-
theme: getThemeName(theme)
169-
})
170-
return fillEmptyHighlightedLine(cleanup(restoreMustache(res)))
171-
}
159+
const highlighted = highlighter.codeToHtml(str, {
160+
lang,
161+
transformers: [
162+
...transformers,
163+
transformerCompactLineOptions(lineOptions),
164+
...userTransformers
165+
],
166+
...(typeof theme === 'string' || 'name' in theme
167+
? { theme }
168+
: {
169+
themes: theme,
170+
defaultColor: false
171+
})
172+
})
172173

173-
if (hasSingleTheme) return codeToHtml(theme)
174-
const dark = addClass(codeToHtml(theme.dark), 'vp-code-dark', 'pre')
175-
const light = addClass(codeToHtml(theme.light), 'vp-code-light', 'pre')
176-
return dark + light
174+
return fillEmptyHighlightedLine(cleanup(restoreMustache(highlighted)))
177175
}
178176
}

‎template/markdown-examples.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ This page demonstrates some of the built-in markdown extensions provided by Vite
44

55
## Syntax Highlighting
66

7-
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
7+
VitePress provides Syntax Highlighting powered by [Shikiji](https://github.com/antfu/shikiji), with additional features like line-highlighting:
88

99
**Input**
1010

11-
````
11+
````md
1212
```js{4}
1313
export default {
1414
data () {

0 commit comments

Comments
 (0)
Please sign in to comment.