Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
3dd5456 to
a094f6f
Compare
a094f6f to
495337c
Compare
495337c to
5a35dbd
Compare
|
@cixzhang — I’d appreciate your feedback on this draft. Focus: Configured code fences can opt into lazy Shiki highlighting while retaining Astryx CodeBlock behavior, source fidelity, and readable fallback. This is PR 17/20 in the linked Markdown stack. It is intentionally one commit and one primary intent; the description includes matched before/after screenshots and previous/next links, so you can review just this PR’s delta. |
humbertovirtudes
left a comment
There was a problem hiding this comment.
Multiline Shiki output currently falls back instead of applying returned tokens. ThemedToken.offset resets for each line, while toSyntaxTokens compares it as a document-global offset, so the second line fails validation. Please add the cumulative line start to each token range and add a real multiline integration case that verifies a token after the first newline is produced by Shiki rather than the fallback tokenizer.
PR Analysis Report
Modified ComponentsOutline (@astryxdesign/core)
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression3 of 422 shot(s) changed. View the report A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | View full report |









User need
Configured code fences can opt into lazy Shiki highlighting while retaining Astryx CodeBlock behavior, source fidelity, and readable fallback.
Problem and solution fit
Hosts otherwise have to coordinate grammar loading, async rendering, token validation, work bounds, theme ownership, and fallback. The adapter keeps the heavy engine off the default path and narrows it to explicit languages.
Current specification
AST-039, the semantic-fence contract, and CodeBlock tokenizer rules. Pinned source.
Public delta and caller burden
Export a configurable Shiki plugin with curated defaults, post-mount loading, character/time bounds, exact token reconstruction, Astryx-owned default scopes, and explicit literal-theme opt-in.
Design and alternatives
The capability is explicit and opt-in where it changes syntax, rendering, or package weight. Existing defaults and replacement seams remain compatible; broader alternatives stay outside this PR.
Evidence
Real-browser evidence
Focused behavior and compatibility coverage ships with the implementation.
Scope
Testing
pnpm exec vitest run packages/core/src/Markdown packages/core/src/CodeBlock— 37 files, 760 tests.pnpm --filter @astryxdesign/core typecheck.pnpm check:repo.Stack
Previous: #6671 · Next: #6673 · Each PR is intentionally one commit and one primary intent.