feat(ui): register bash, java, and pkl Prism grammars for CodeBlock - #8
Conversation
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
==========================================
+ Coverage 97.89% 97.98% +0.08%
==========================================
Files 38 39 +1
Lines 712 743 +31
Branches 318 310 -8
==========================================
+ Hits 697 728 +31
Misses 15 15
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds additional Prism language grammars to the UI package so CodeBlock can syntax-highlight bash, java, and a custom pkl grammar using the Prism instance shipped with prism-react-renderer.
Changes:
- Add a side-effect module that registers
bash,java, andpklgrammars intoPrism.languages. - Ensure
CodeBlockloads these grammars by importing the registration module. - Update package
sideEffectsconfiguration intended to prevent tree-shaking of the registration module.
File summaries
| File | Description |
|---|---|
| packages/ui/src/components/prism-languages.ts | Adds Prism grammar registrations for bash, java, and a custom pkl grammar. |
| packages/ui/src/components/code-block.tsx | Imports the grammar registration module so CodeBlock can highlight the new languages. |
| packages/ui/package.json | Updates sideEffects to try to preserve the side-effectful grammar registration module during bundling. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
No description provided.