Normalize docs code fence languages#3004
Conversation
Greptile SummaryThis PR fixes a bug where code fence language strings with trailing whitespace (e.g.,
Confidence Score: 5/5Minimal, focused change touching only the code highlighter utility; both the fix and the fallback path are straightforward and backed by new tests. The change is a two-line addition to a single utility function, with no side effects outside No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "test: cover code block fallback language" | Re-trigger Greptile |
|
Added a follow-up test for the omitted-language fallback that Greptile called out. Verification: git diff --check. I still couldn't run the Bun-based unit suite locally because Bun is not installed in this environment. |
What does this PR do?
Normalizes code fence language strings before handing them to the docs code highlighter and before emitting the
language-*class. This keeps values likecsharpfrom missing the registeredcsharphighlighter or producing a trailing-space CSS class.It also adds a focused unit test for the
.NET/csharpcase.Test Plan
git diff --checkI could not run the Bun-based project checks locally because Bun is not installed in this environment; the project CI installs Bun and should cover
bun run checkand tests.Related PRs and Issues
csharp) appwrite#12333Checklist
This was implemented with Codex assistance, with the patch kept focused and manually reviewed before sending.