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

Code highlighten broken with re-render #47

Open
chadwhitacre opened this issue Aug 15, 2022 · 3 comments
Open

Code highlighten broken with re-render #47

chadwhitacre opened this issue Aug 15, 2022 · 3 comments

Comments

@chadwhitacre
Copy link
Member

Problem

We're a dev-first company. Code is front-and-center and should look good but does not.

Solution Brainstorm

Some Remix-integrated library already for this?

@ckj
Copy link
Member

ckj commented Aug 15, 2022

I think we'll just need react-prismjs and our prism theme.

@dcramer
Copy link
Member

dcramer commented Aug 16, 2022

So we have prism already installed - with the sentry theme even. Gonna look at why its not applying as expected here.

@dcramer
Copy link
Member

dcramer commented Aug 16, 2022

I dug into this a bit..

The issue is on the client its re-rendering and removing the prism formatting. Ideally what we'd do here is only render this on the server, but the design of Remix doesn't make that convenient. It allows server-specific logic, but only at the route layer. Right now I'm not entirely sure how to fix this, but another option is to load this entirely in the browser (gross).

@dcramer dcramer changed the title Implement code highlighting Code highlighten broken with re-render Dec 14, 2022
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

3 participants