Repository navigation
Conversation
Shiki leaves default-color tokens as bare <span>s, which inherit the page's pre/code color (dark gray on BetterDocs). Every token span now carries color: var(--shiki-color-text), as CBP's own output does. data-code-block-pro-font-family held the full fallback stack, so CBP's front-end script requested a font file that does not exist. It now holds the bare fontFamily attribute.
|
Caution Review failedThe pull request is closed. WalkthroughThe enrichers and bundled MCP server now add text colors to unstyled token spans and update font metadata only when a usable font attribute is supplied. Tests cover the rendered colors and font values. The changelog describes the fixes. ChangesCode Block Pro rendering
Estimated code review effort: 2 (Simple) | ~10 minutes
|
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.
Code Block Pro blocks written through Block MCP rendered gray text on navy on docs pages, and two-digit line numbers broke onto two lines. Blocks written now match blocks made in the editor.
Fixes BLOCK-52
What changed
shikiHighlight(): every default-color token span getsstyle="color: var(--shiki-color-text)", as CBP's own output does. A bare<span>took the page'spre/codecolor, which is dark gray on BetterDocs.syncWrapperFontFamily():data-code-block-pro-font-familyholds the barefontFamilyattribute. CBP's front-end script loadsbuild/fonts/<value>.woff2, so the fallback stack there requested a file that does not exist. The webfont never loaded and the wider fallback font wrapped line numbers.Blast radius
shikiHighlight()andsyncWrapperFontFamily()insrc/enrichers.tssrc/enrichers.tsand its tests. Every Code Block Pro write goes through them.Release: none until the next Block MCP version bump (internal tool)
Testing
💾 Build file (c219d9e).
Summary by CodeRabbit