Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
bf319f8 to
024f452
Compare
024f452 to
edef89c
Compare
Summary: Add an optional, lazy Mermaid semantic-fence plugin with serialized strict rendering, sanitized SVG output, source-free diagnostics, and an ordinary CodeBlock fallback. Expose the tree-shakeable subpath and document its accessibility, security, and theming contracts. Test Plan: - pnpm exec vitest run packages/core/src/Markdown --root . - pnpm --filter @astryxdesign/core typecheck - pnpm --filter @astryxdesign/core typecheck:docs - pnpm --filter @astryxdesign/core build - pnpm check:repo - pnpm visual:probe-theme:check
edef89c to
5bcdc24
Compare
|
@cixzhang — I’d appreciate your feedback on this draft. Focus: Exact This is PR 14/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.
The lazy fallback, global render serialisation, diagnostics, and basic active-content tests are good, but two blockers remain. The Mermaid contract needs to land as current authority before this implementation. More importantly, the SVG importer is a partial deny-list: it removes several active elements, event attributes, and unsafe hrefs, but still admits CSS and other resource-bearing SVG surfaces before mounting the tree. Please replace this with a fail-closed SVG element and attribute policy and cover style and resource URL sinks.
PR Analysis Report
Modified ComponentsOutline (@astryxdesign/core)
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression2 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
Exact
mermaidfences can render strict diagrams while preserving an ordinary CodeBlock during loading or failure.Problem and solution fit
Diagram hosts otherwise duplicate fence recognition, async loading, global Mermaid serialization, SVG sanitization, and fallback behavior. The plugin packages those constraints behind the canonical semantic-fence protocol.
Current specification
AST-039 and the Markdown semantic-fence/plugin contracts. Pinned source.
Public delta and caller burden
Export a tree-shakeable Mermaid plugin, load Mermaid's browser bundle only after mount, keep optional renderer adapters out of the docsite's eager playground scope, serialize global engine access, enforce strict configuration, parse SVG without executing authored HTML, remove active/unsafe content, and retain source fallback.
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: #6668 · Next: #6670 · Each PR is intentionally one commit and one primary intent.