Skip to content

Commit

Permalink
Escape markdown {{ with v-pre in vitepress
Browse files Browse the repository at this point in the history
  • Loading branch information
erickguan committed Sep 18, 2024
1 parent 76c6487 commit 328ce80
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,13 @@ export default defineConfig({
},
},
markdown: {
// languages: [
// "elisp"
// ]
config(md) {
const defaultCodeInline = md.renderer.rules.code_inline!
md.renderer.rules.code_inline = (tokens, idx, options, env, self) => {
tokens[idx].attrSet('v-pre', '')
return defaultCodeInline(tokens, idx, options, env, self)
}
}
},
head: [
[
Expand Down

0 comments on commit 328ce80

Please sign in to comment.