SyntaxUI / syntaxui

Get free access to pre-built, Tailwind CSS-powered components, animations and effects - brought to life using Framer Motion. Just copy, paste and you're ready to go!
https://syntaxui.com
MIT License
636 stars 45 forks source link

fix: shiki -> react-syntax-highlighter #136

Closed epoll31 closed 2 months ago

epoll31 commented 2 months ago

Description

using react-syntax-highlighter in Code now / ComponentPreview references Code again / customizable prism theme

Related Issue

Fixes #135

Proposed Changes

Screenshots

Screenshot 2024-05-03 at 10 57 04 AM

Checklist

Please check the boxes that apply:

vercel[bot] commented 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.

vercel[bot] commented 2 months ago

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
Ansub commented 2 months ago

what are these useMemo() doing?

image

epoll31 commented 2 months ago

what are these useMemo() doing?

image

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