-
-
Notifications
You must be signed in to change notification settings - Fork 164
Description
Hello, and thanks again for all the work.
I have a private rehype plugin that relies on code blocks with a specific language to be set (think bla-bla-blub
, more like a private api). It also relies on the fact that these code blocks are not manipulated by remark plugins (expecting a specific node/tree structure).
Right now a warning is displayed for unsupported languages, but the transform is happening regardless (with lang=text).
I would like to have the option to disable this behaviour and not do any transformations on unsupported languages.
Another option would be to not highlight unsupported languages and tell the user to use lang=text
.
codehike/packages/mdx/src/highlighter/index.tsx
Lines 60 to 64 in 3e61df6
console.warn( | |
"[Code Hike warning]", | |
`${lang} is not a valid language, no syntax highlighting will be applied.` | |
) | |
return highlight({ code, lang: "text", theme }) |