-
When I try to embed code into a block code that is coming from frontmatter it doesn't highlight the code. Example: ---
somecode: |
{
foo: bar
}
---
```json-vue
{{ $frontmatter.somecode }}
```
|
Beta Was this translation helpful? Give feedback.
Answered by
brc-dd
Apr 4, 2024
Replies: 1 comment 3 replies
-
It's expected. We can't fix it. Refer the last line here - https://vitepress.dev/guide/using-vue#unescape-in-code-blocks You'll need to use data loader to generate html from that and insert that using v-html if you want syntax highlighting there. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Flayzera
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's expected. We can't fix it. Refer the last line here - https://vitepress.dev/guide/using-vue#unescape-in-code-blocks
You'll need to use data loader to generate html from that and insert that using v-html if you want syntax highlighting there.