Repository navigation
feat(render): color fenced code blocks by language - #11
Merged
Merged
Conversation
Public pages and previews now color comments, strings, numbers, keywords, types, functions, and attributes in fenced code, for Rust and thirteen other languages, in light and dark themes and without JavaScript. Coloring is presentation only. An article's identity HTML, and so its approved revision, is unchanged: token classes are added when a page is projected, within the room the plain page leaves under the size limit. The stylesheet gains the token colors, so the frontend bundle changes. The frontend of releases 0.1.1 through 0.1.6 is frozen beside 0.1.0's, and startup verifies a retained site against either before upgrading its presentation.
tee8z
force-pushed
the
feat/code-highlighting
branch
from
October 3, 2026 19:45
25aeee9 to
19e6690
Compare
tee8z
marked this pull request as ready for review
October 3, 2026 19:46
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.
Fenced code was rendered in one color. Public pages and previews now color comments, strings, numbers, keywords, types, functions, and attributes, in light and dark themes and without JavaScript. Rust gets the most attention (lifetimes, attributes, macros, raw strings, character literals); JavaScript/TypeScript, Python, Go, the C family, shell, SQL, TOML, YAML, JSON, Nix, Ruby, Dockerfile, and CSS get comments, strings, numbers, and keywords. HTML, XML, and diffs stay uncolored.
Validation: clippy with warnings denied passes. The scanner tests check that runs always concatenate back to the source, including unterminated and non-ASCII input. Projection tests cover identity versus projected HTML, uncolored fences, and the size-limit fallback. The startup test upgrades a site published under each frozen frontend. An upgrade rehearsal against a site published by the released 0.1.6 binary runs before release.