Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/fix-shiki-theme-priority.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"streamdown": patch
---

Fix: `shikiTheme` prop now takes priority over the code plugin's default theme.

Previously, the nullish coalescing order was incorrect, causing the code plugin's `getThemes()` to override the explicitly passed `shikiTheme` prop. The order has been swapped so the prop takes precedence.
2 changes: 1 addition & 1 deletion packages/streamdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ export const Streamdown = memo(
// Combined context value - single object reduces React tree overhead
const contextValue = useMemo<StreamdownContextType>(
() => ({
shikiTheme: plugins?.code?.getThemes() ?? shikiTheme,
shikiTheme: shikiTheme ?? plugins?.code?.getThemes(),
controls,
isAnimating,
lineNumbers,
Expand Down
Loading