-
#1767 According to this issue, I saw the relevant documents, <code v-pre>
{{
</code> |
Beta Was this translation helpful? Give feedback.
Answered by
brc-dd
Mar 31, 2024
Replies: 1 comment 1 reply
-
If you don't want to use vue interpolation in inline code anywhere, you can add something like this to your config: import { defineConfig } from 'vitepress'
export default defineConfig({
markdown: {
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)
}
}
}
}) Then simply use it like you'd normally have: `{{ foo }}` |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
oeyoews
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you don't want to use vue interpolation in inline code anywhere, you can add something like this to your config:
Then simply use it like you'd normally have: