Repository navigation
Highlight example code with the API documentation palette - #62
Merged
Merged
Conversation
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.
Source panels in every gallery example now highlight TypeScript, TSX, and HTML with Shiki's
dark-pluspalette, matching the API reference. TypeDoc's existing light/dark palettes are explicitly configured to keep the choice visible.HTML host snippets are formatted with Prettier before highlighting, restoring two-space indentation and readable element/attribute breaks even after production HTML minification. All example code panels use a consistent system monospace font.
The shared highlighter preserves copyable source and inserts token text through DOM APIs, so displayed HTML remains inert. Presentation dependencies stay outside the published library, and the basic example remains independently runnable.
Validation:
npm run lint:fix,npm run format,npm run check, the Chromium browser suite plus a targeted rerun of the HTML regression (127 tests covered), focused highlighting/HTML tests in Firefox and WebKit,npm run check:examplein all three engines, and a separate install/build of the basic example. Desktop and mobile screenshots were visually reviewed.