Skip to content

fix(core): Fix an issue where the PackageManagerTabs component outputs broken Markdown#2861

Merged
SoonIter merged 1 commit intoweb-infra-dev:mainfrom
Karibash:bugfix/package-manager-tab
Dec 8, 2025
Merged

fix(core): Fix an issue where the PackageManagerTabs component outputs broken Markdown#2861
SoonIter merged 1 commit intoweb-infra-dev:mainfrom
Karibash:bugfix/package-manager-tab

Conversation

@Karibash
Copy link
Copy Markdown
Contributor

@Karibash Karibash commented Dec 8, 2025

Summary

This PR fixes an issue where the PackageManagerTabs component generated malformed Markdown.
Previously, all commands were emitted in a single continuous block, resulting in unreadable output:

スクリーンショット 2025-12-08 17 56 31

After this fix, the component produces properly formatted and separated Markdown code blocks with labels:

スクリーンショット 2025-12-08 17 55 23

Related Issue

#2857

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 8, 2025 08:52
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 8, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 3061f57
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/693691edb9b4ea0008d46e88
😎 Deploy Preview https://deploy-preview-2861--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

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 adds SSR markdown generation support to the PackageManagerTabs component to fix broken markdown output when the component is used in the LLMS (Language Learning Model Serving) feature context.

Key Changes

  • Adds conditional markdown string generation when process.env.__SSR_MD__ is true
  • Uses a reduce function to iterate through all package manager commands and format them as markdown code blocks with labels

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

Comment thread packages/core/src/theme/components/PackageManagerTabs/index.tsx
Copy link
Copy Markdown
Member

@SoonIter SoonIter left a comment

Choose a reason for hiding this comment

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

thanks ❤️️

@SoonIter SoonIter merged commit f13046d into web-infra-dev:main Dec 8, 2025
17 checks passed
@Karibash Karibash deleted the bugfix/package-manager-tab branch December 8, 2025 09:58
@github-actions github-actions Bot mentioned this pull request Dec 8, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants