You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a bit confused where to start in solving this. Do I need a custom transformer? Or is there something simpler I can do in the nuxt config that I don't know about?
I would like to be able to write markdown like this so that foo would have a special class applied so that just the token could be highlighted.
```js /foo/
const foo = 'bar'
```
The shiki highlighter has an option for tokens, but I am having a hard time knowing the best way to solve this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a custom
ProsePre
component, and I looked at the docs for markdown configuration. It gives this exampleand also an example for
rehype
. I want to setuprehype-pretty-code
but installing it with npm and adding it to the rehype plugins does nothing:I am a bit confused where to start in solving this. Do I need a custom transformer? Or is there something simpler I can do in the nuxt config that I don't know about?
I would like to be able to write markdown like this so that
foo
would have a special class applied so that just the token could be highlighted.The shiki highlighter has an option for tokens, but I am having a hard time knowing the best way to solve this.
Beta Was this translation helpful? Give feedback.
All reactions