Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page fails to render #228

Open
ttasovac opened this issue Oct 5, 2023 · 1 comment
Open

page fails to render #228

ttasovac opened this issue Oct 5, 2023 · 1 comment

Comments

@ttasovac
Copy link

ttasovac commented Oct 5, 2023

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.

@carbonrobot
Copy link
Contributor

carbonrobot commented Feb 7, 2024

Do you have errors in the browser console? Can you post a reproduceable example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants