Skip to content

fix: markdown code blocks not showing syntax highlighting#24

Open
junggamyeon wants to merge 1 commit into
mainfrom
fix-markdown
Open

fix: markdown code blocks not showing syntax highlighting#24
junggamyeon wants to merge 1 commit into
mainfrom
fix-markdown

Conversation

@junggamyeon
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

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

Project Deployment Actions Updated (UTC)
endgit-web Ready Ready Preview, Comment May 24, 2026 9:30am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes markdown code block syntax highlighting in MarkdownTabs by preserving code language classes through sanitization and adapting block-code detection for react-markdown v10.

Changes:

  • Allows className on sanitized <code> elements.
  • Replaces removed inline prop usage with a position/content-based inline-code heuristic.
  • Keeps syntax highlighting limited to detected language code blocks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


img: ["src", "alt", "title", "width", "height"],

code: [...(defaultSchema.attributes?.code || []), "className"],
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