prism-react-renderer icon indicating copy to clipboard operation
prism-react-renderer copied to clipboard

page fails to render

Open ttasovac opened this issue 8 months ago • 1 comments

I have installed prism-react-renderer with:

npm install prism-react-renderer

Then in a component, I do:

import Highlight, { defaultProps } from "prism-react-renderer";

So far so good, no errors.

But when I try to test syntax highlighting from the same component with:

const CodeBlock = `
<p>Test.</p> 
`

<Highlight language="html" code={CodeBlock}></Highlight>

I still get no errors in the console (success Re-building development bundle), but I get a blank page in the browser.

Any idea what could be going wrong or how to troubleshoot this? Many thanks in advance.

ttasovac avatar Oct 05 '23 03:10 ttasovac