Skip to content

Replace react-markdown with Streamdown renderer - #292

Merged
kiwicopple merged 3 commits into
masterfrom
streamdown-renderer
Aug 22, 2025
Merged

kiwicopple merged 3 commits into
masterfrom
streamdown-renderer

Conversation

@kiwicopple

Copy link
Copy Markdown
Member

Summary

  • Replaced react-markdown (v9.0.1) with streamdown (v1.0.11) for improved markdown rendering
  • Streamdown is a modern markdown renderer by Vercel optimized for AI streaming applications
  • All existing functionality preserved including custom typography components and copy-to-clipboard

Changes

  • Dependencies: Removed react-markdown, remark-gfm, rehype-highlight; Added streamdown
  • Markdown Component: Updated to use Streamdown API while maintaining all custom component mappings
  • Next.js Config: Added transpilePackages: ['streamdown'] to handle KaTeX CSS imports

Benefits

  • ✨ Built-in GitHub Flavored Markdown support
  • 🎨 Shiki syntax highlighting (replaces rehype-highlight)
  • 🧮 LaTeX math expressions support
  • 🤖 Better handling of incomplete markdown (useful for AI streaming)
  • 🔒 Built-in security hardening for links and images
  • 🚀 Maintained by Vercel team

Test Plan

  • Build passes without errors
  • TypeScript compilation successful
  • ESLint checks pass
  • Verify markdown rendering on package detail pages
  • Test dark/light mode compatibility
  • Confirm copy-to-clipboard functionality works

🤖 Generated with Claude Code

- Migrated from react-markdown (v9.0.1) to streamdown (v1.0.11)
- Removed dependencies: react-markdown, remark-gfm, rehype-highlight
- Updated Markdown component to use Streamdown API
- Added transpilePackages config for KaTeX CSS handling
- Preserved all custom component mappings and copy functionality

Benefits: Built-in GFM support, Shiki syntax highlighting, LaTeX math support, better incomplete markdown handling, and security hardening.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@supabase

supabase Bot commented Aug 21, 2025

Copy link
Copy Markdown

This pull request has been ignored for the connected project xmuptpplfviifrbwmmtv because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel

vercel Bot commented Aug 21, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
dbdev Ready Ready Preview Comment Aug 22, 2025 9:15am

@kiwicopple
kiwicopple merged commit 0123e36 into master Aug 22, 2025
7 of 8 checks passed
@kiwicopple
kiwicopple deleted the streamdown-renderer branch August 22, 2025 09:14

This branch was successfully deployed

1 active deployment
Preview — 68979160 Deployed Aug 22, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants