- Notifications
You must be signed in to change notification settings - Fork 6
feat(PrismCode): react renderer #687
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
Conversation
🦋 Changeset detectedLatest commit: 40f565a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
❌ Deploy Preview for cube-uikit-docs failed.
|
| The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 NPM canary releaseDeployed canary version 0.0.0-canary-48ab13c. |
🧪 Storybook is successfully deployed!
|
🏗 Docs are successfully deployed!👀 Preview: https://683f2da9f274be0cfa1ac8c8--cube-uikit-docs.netlify.app |
🏋️ Size limit report
Click here if you want to find out what is changed in this build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces direct PrismJS usage with prism-react-renderer for syntax highlighting in the PrismCode component.
- Switch from
Prism.highlightAllto<Highlight>fromprism-react-rendererand manual token rendering - Bridge the renderer’s Prism instance to global and dynamically import grammars
- Update dependencies to include
prism-react-renderer
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/components/content/PrismCode/PrismCode.tsx | Replace PrismJS usage with prism-react-renderer and dynamic grammar imports |
| package.json | Add prism-react-renderer dependency |
| .changeset/fair-turtles-switch.md | Note change of rendering engine in changelog |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
src/components/content/PrismCode/PrismCode.tsx:87
- This new rendering logic isn't covered by existing tests. Consider adding unit or snapshot tests for both standard code blocks and diff highlighting scenarios to prevent regressions.
function PrismCode(props: CubePrismCodeProps, ref) {
No description provided.