@@ -14,8 +14,8 @@ import { sfcPlugin, type SfcPluginOptions } from '@mdit-vue/plugin-sfc'
14
14
import { titlePlugin } from '@mdit-vue/plugin-title'
15
15
import { tocPlugin , type TocPluginOptions } from '@mdit-vue/plugin-toc'
16
16
import { slugify } from '@mdit-vue/shared'
17
- import MarkdownIt from 'markdown-it'
18
17
import type { Options } from 'markdown-it'
18
+ import MarkdownIt from 'markdown-it'
19
19
import anchorPlugin from 'markdown-it-anchor'
20
20
import attrsPlugin from 'markdown-it-attrs'
21
21
// @ts -expect-error: types of markdown-it-emoji are not up-to-date
@@ -29,14 +29,15 @@ import type {
29
29
} from 'shiki'
30
30
import type { Logger } from 'vite'
31
31
import { containerPlugin , type ContainerOptions } from './plugins/containers'
32
+ import { gitHubAlertsPlugin } from './plugins/githubAlerts'
32
33
import { highlight } from './plugins/highlight'
33
34
import { highlightLinePlugin } from './plugins/highlightLines'
34
35
import { imagePlugin , type Options as ImageOptions } from './plugins/image'
35
36
import { lineNumberPlugin } from './plugins/lineNumbers'
36
37
import { linkPlugin } from './plugins/link'
37
38
import { preWrapperPlugin } from './plugins/preWrapper'
39
+ import { restoreEntities } from './plugins/restoreEntities'
38
40
import { snippetPlugin } from './plugins/snippet'
39
- import { gitHubAlertsPlugin } from './plugins/githubAlerts'
40
41
41
42
export type { Header } from '../shared'
42
43
@@ -205,11 +206,7 @@ export const createMarkdownRenderer = async (
205
206
} )
206
207
207
208
md . linkify . set ( { fuzzyLink : false } )
208
-
209
- // disable entity decode/escape from markdown-it, as the Vue compiler already
210
- // decodes them.
211
- md . disable ( 'entity' )
212
- md . renderer . rules . text = ( tokens , idx ) => tokens [ idx ] . content
209
+ md . use ( restoreEntities )
213
210
214
211
if ( options . preConfig ) {
215
212
options . preConfig ( md )
0 commit comments