Skip to content

Add syntax highlighting to chat code blocks - #3

Open
Filsommer wants to merge 1 commit into
shadcn-ui:mainfrom
Filsommer:feat/code-block-highlighting
Open

Add syntax highlighting to chat code blocks#3
Filsommer wants to merge 1 commit into
shadcn-ui:mainfrom
Filsommer:feat/code-block-highlighting

Conversation

@Filsommer

@Filsommer Filsommer commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • render fenced Markdown code with Shiki syntax highlighting that follows the active theme
  • show language labels and an accessible one-click copy action (support hundreds of languages via Shiki)
  • preserve inline-code rendering and avoid nested pre elements
Screenshot 2026-08-11 at 14 40 32

Test plan

  • pnpm typecheck
  • pnpm lint
  • pnpm build

Made with Cursor

@socket-security

socket-security Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedreact-shiki@​0.11.09910010091100

View full report

@shadcn

shadcn commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Let me take a look. Thinking if we want syntax highlighting or keep the template minimal. I'm leaning towards yes we do.

Render fenced markdown with theme-aware highlighting, language labels, and one-click copying.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shadcn
shadcn force-pushed the feat/code-block-highlighting branch from 76046d4 to 6d9e89c Compare August 11, 2026 16:15
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