feat: add custom Mermaid configuration support#122
Merged
haydenbleasel merged 3 commits intovercel:mainfrom Sep 11, 2025
Merged
feat: add custom Mermaid configuration support#122haydenbleasel merged 3 commits intovercel:mainfrom
haydenbleasel merged 3 commits intovercel:mainfrom
Conversation
Contributor
|
@ayhansipahi legendary improvement 🚀 |
own-boldsbrain
pushed a commit
to own-boldsbrain/streamdown
that referenced
this pull request
Sep 22, 2025
* feat: add custom Mermaid configuration support * ci: add change set * fix: optimize mermaid config comparison and initialization
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.
Description
Implements the ability to pass custom properties during Mermaid initialization as requested in issue #120. Users can now customize themes, colors, fonts, and other Mermaid rendering options.
Type of Change
Related Issues
Closes #120
Changes Made
Testing
Test Coverage
Test Files 10 passed (10) Tests 217 passed (217) Start at 00:06:34 Duration 2.49s (transform 550ms, setup 2.60s, collect 4.00s, tests 1.84s, environment 5.85s, prepare 953ms) % Coverage report from v8 -------------------------------|---------|----------|---------|---------|----------------------------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -------------------------------|---------|----------|---------|---------|----------------------------------------------- All files | 81.61 | 93.31 | 80 | 81.61 | streamdown | 100 | 100 | 100 | 100 | index.tsx | 100 | 100 | 100 | 100 | streamdown/lib | 80.55 | 92.95 | 80 | 80.55 | code-block.tsx | 98.57 | 93.33 | 90 | 98.57 | 90,576-582 components.tsx | 98 | 86.84 | 100 | 98 | 53-56,58 image.tsx | 4.1 | 100 | 0 | 4.1 | 13-98 mermaid.tsx | 98.91 | 90.9 | 100 | 98.91 | 81 parse-blocks.tsx | 100 | 75 | 100 | 100 | 19,32-33 parse-incomplete-markdown.ts | 94.49 | 96.51 | 94.44 | 94.49 | 73-74,370-373,419-433 table.tsx | 23.44 | 75 | 16.66 | 23.44 | 10-88,111-160,195-267,286-314,318-324,346-361 utils.ts | 28.57 | 100 | 50 | 28.57 | 7-16 -------------------------------|---------|----------|---------|---------|----------------------------------------------- └─ streamdown#test:coverage ── Tasks: 1 successful, 1 total Cached: 0 cached, 1 total Time: 3.342sScreenshots/Demos
Checklist
pnpm changeset)Changeset
Additional Notes