Closed epoll31 closed 2 months ago
@epoll31 is attempting to deploy a commit to the SyntaxUI Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
syntax-ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 3, 2024 6:13pm |
what are these useMemo() doing?
what are these useMemo() doing?
I used them to avoid performing those string mutations on rerenders. They are pretty simple so I don't think that they are vital, but I thought it would be better with them.
Specifically, the code one trims the extra white space and newlines. And, the language one removes "language-" from the language or returns "plaintext" when no language specified
Description
using
react-syntax-highlighter
in Code now / ComponentPreview references Code again / customizable prism themeRelated Issue
Fixes #135
Proposed Changes
react-syntax-highlighter
instead ofcodeToHtml
insrc/components/code/Code.tsx
Code
instead ofreact-syntax-highlighter
insrc/components/code/ComponentPreview.tsx
to only referencereact-syntax-highlighter
in one placereact-syntax-highlighter
uses a theme defined insrc/components/code/theme.ts
src/styles/tailwind.css
Screenshots
Checklist
Please check the boxes that apply:
npm run build
and build is successful