Error: Unknown language: g
is not registered
#1013
-
Hello function name() { } I put it and want to specify the language of the code, this error is displayed for me The piece of code I wrote in the program: <ReactMarkdown children={markdown} rehypePlugins={[rehypeHighlight]} remarkPlugins={[remarkGfm]} /> I think the rehypeHighlight plugin caused this error |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Please provide much more information. |
Beta Was this translation helpful? Give feedback.
-
That error is thrown when something like the following is written:
Typically, if a plugin throws an error, you’ll find more information in the readme of that plugin. |
Beta Was this translation helpful? Give feedback.
-
The Code
Error |
Beta Was this translation helpful? Give feedback.
That error is thrown when something like the following is written:
Typically, if a plugin throws an error, you’ll find more information in the readme of that plugin.
In this case, you can reach its API docs: https://github.com/rehypejs/rehype-highlight#unifieduserehypehighlight-options.
Specifically, when reading that, you’ll find an option that you can use to not throw an error for missing languages: https://github.com/rehypejs/rehype-highlight#optionsignoremissing.