mirror of https://github.com/vuejs/vitepress
commit
4355eb2cff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
import type MarkdownIt from 'markdown-it'
|
||||
|
||||
export function restoreEntities(md: MarkdownIt): void {
|
||||
md.core.ruler.disable('text_join')
|
||||
md.renderer.rules.text_special = (tokens, idx) => {
|
||||
if (tokens[idx].info === 'entity') {
|
||||
return tokens[idx].markup // leave as is so Vue can handle it
|
||||
}
|
||||
return md.utils.escapeHtml(tokens[idx].content)
|
||||
}
|
||||
}
|
Loading…
Reference in new issue