@@ -14,8 +14,8 @@ import { sfcPlugin, type SfcPluginOptions } from '@mdit-vue/plugin-sfc'
1414import { titlePlugin } from '@mdit-vue/plugin-title'
1515import { tocPlugin , type TocPluginOptions } from '@mdit-vue/plugin-toc'
1616import { slugify } from '@mdit-vue/shared'
17- import MarkdownIt from 'markdown-it'
1817import type { Options } from 'markdown-it'
18+ import MarkdownIt from 'markdown-it'
1919import anchorPlugin from 'markdown-it-anchor'
2020import attrsPlugin from 'markdown-it-attrs'
2121// @ts -expect-error: types of markdown-it-emoji are not up-to-date
@@ -29,14 +29,15 @@ import type {
2929} from 'shiki'
3030import type { Logger } from 'vite'
3131import { containerPlugin , type ContainerOptions } from './plugins/containers'
32+ import { gitHubAlertsPlugin } from './plugins/githubAlerts'
3233import { highlight } from './plugins/highlight'
3334import { highlightLinePlugin } from './plugins/highlightLines'
3435import { imagePlugin , type Options as ImageOptions } from './plugins/image'
3536import { lineNumberPlugin } from './plugins/lineNumbers'
3637import { linkPlugin } from './plugins/link'
3738import { preWrapperPlugin } from './plugins/preWrapper'
39+ import { restoreEntities } from './plugins/restoreEntities'
3840import { snippetPlugin } from './plugins/snippet'
39- import { gitHubAlertsPlugin } from './plugins/githubAlerts'
4041
4142export type { Header } from '../shared'
4243
@@ -205,11 +206,7 @@ export const createMarkdownRenderer = async (
205206 } )
206207
207208 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 )
213210
214211 if ( options . preConfig ) {
215212 options . preConfig ( md )
0 commit comments