[✨] Add extra syntax highlighters via. MDX config #162
Replies: 4 comments
-
Just to confirm, I'm happy to take a crack at this if it looks like the right approach |
Beta Was this translation helpful? Give feedback.
-
I am not sure if I am right with my issue but when I try to install react-markdown |
Beta Was this translation helpful? Give feedback.
-
should be easy to add a PR! anybody open for it? |
Beta Was this translation helpful? Give feedback.
-
We moved this issue to |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem?
Currently, I cannot seem to register extra languages to refractor as it is run as part of the Vite build process via. a plugin.
As you can see, this does register the tsx syntax but nothing else - https://github.com/BuilderIO/qwik/blob/6f3f0ef5a8eb472a9dab0e934a5327dd1005cfb2/packages/qwik-city/buildtime/markdown/syntax-highlight.ts
Describe the solution you'd like
Allow specifying additional languages to be registered.
This might be best done via. a 'setup' callback, which has access to the
Refractor
object:This
setup
callback would be passed to therehypeSyntaxHighlight
plugin and called there.Describe alternatives you've considered
I tried to import
refractor
and register new languages in theroot.tsx
as part of auseTask$
but it had no effect.Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions