Repository navigation
Conversation
TinaCMS's prism-react-renderer bundle omits csharp/bash/powershell/http/dotenv, so hundreds of SSW Rules tagged with those languages render monochrome. Register the missing PrismJS grammars into the shared prism-react-renderer registry (with cs→csharp and shell→bash aliases) and cover them with a unit test. Prepared with AI assistance.
Drop the custom dotenv grammar and PowerShell flag tweak. Load csharp, bash, powershell and http from prismjs/components onto prism-react-renderer's Prism (documented custom-language approach), with cs/dotnet->csharp and sh/shell->bash aliases. Prepared with AI assistance.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
✅
prism-react-renderer, whose bundled language set has nocsharp/cs,bash/shell/sh,powershellorhttpgrammars.csharp/csalone) and render monochrome on https://www.ssw.com.au. Example: Aspire — YAML is coloured, C# is not (token plainonly).PrismtoglobalThis, then load upstreamprismjs/components(prism-csharp,prism-bash,prism-powershell,prism-http) so they register onto that same instance. Aliases:cs/dotnet→csharp,sh/shell→bash.components/typography-components.tsx. Direct deps:prism-react-renderer@2.4.1,prismjs@1.30.0,@types/prismjs@1.26.6(lockfile regenerated with pnpm).__tests__/lib/prismGrammars.test.ts(csharp/cs/dotnet, bash/sh/shell, powershell, http).Prepared with AI assistance.
Screenshot (optional)
✅
Captured from the local Jackdaw preview of centralise-local-dev-config-and-secrets-in-apphost with the import removed, then restored.
Before (C# block — 1 computed token colour)
After (same C# block — 4 computed token colours)
Full-page before/after (optional): before · after
Verification
pnpm exec biome linton the touched files — passpnpm exec tsc --noEmit— passpnpm exec jest __tests__/lib/prismGrammars.test.ts— 4/4 pass