react-code-blocks
react-code-blocks copied to clipboard
Error: Language cs not supported
I used the below code. I tried both language csharp and cs. There is an error in the dev version but the style is still applied for the code block. In the build production version, the error is still there but there is no style for code. How can I fix this?
<CopyBlock
language='csharp'
text={codeString}
wrapLines
showLineNumbers
theme={sunburst}
codeBlock
></CopyBlock>
I'm having the same issue, and I believe it's a bug. From what I can see csharp
is mapped to cs
and passed to the PrismAsyncLight
component from react-syntax-highlighter
which expects csharp
as the language.
@rajinwonderland can you confirm? I'd be happy to submit a PR
I have the same issue, cs and csharp don't work
Hi. I am using v0.0.9-0 of react-code-blocks with react v16.14.0 and I am still getting this error? Do you have any updates on this? Thanks!
Hello! Same here, any news on this? Thanks 🙏
I ended up just switching to use react-syntax-highlighter
instead