rspress
rspress copied to clipboard
Replace containerSyntax with remark-directive
Summary
Replaces custom container parsing logic with remark-directive while maintaining backward compatibility for VuePress/Docusaurus syntax.
Related Issue
Related to issue about replacing containerSyntax with remark-directive implementation.
Changes
- Dependencies: Moved
remark-directiveandmdast-util-directiveto runtime dependencies - Plugin chain: Added
remarkDirectivebeforeremarkContainerSyntaxin the processing pipeline - Implementation: Refactored
containerSyntax.tsto useremark-directivefor standard syntax (e.g.,:::tip) while preserving custom parsing for:- VuePress/Docusaurus plain text titles:
::: tip Custom Title - GitHub alerts:
> [!TIP]
- VuePress/Docusaurus plain text titles:
- Whitespace normalization: Updated snapshots to reflect cleaner output (removed unnecessary leading newlines from
remark-directiveparsed content)
Checklist
- [x] Tests updated (or not required).
- [x] Documentation updated (or not required).
Original prompt
尝试将 containerSyntax 替换为 remark-directive 相关实现
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Deploy Preview for rspress-v2 ready!
| Name | Link |
|---|---|
| Latest commit | 44ada49d17c79ae1b0f2007dde0826991c42d195 |
| Latest deploy log | https://app.netlify.com/projects/rspress-v2/deploys/6916d7b14a02bf000817081e |
| Deploy Preview | https://deploy-preview-2762--rspress-v2.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
https://github.com/web-infra-dev/rspress/pull/2756#issuecomment-3528239140
https://docusaurus.io/blog/releases/3.0#markdown
We plan to maintain consistency with docusaurus in the implementation of admonitions, to correctly support the directive syntax in the commonmark specification.
https://github.com/web-infra-dev/rspress/issues/2550
Rsdoctor Bundle Diff Analysis
| Metric | Current | Baseline | Change |
|---|---|---|---|
| 📊 Total Size | 14.3 MB | 14.3 MB | -68.0 B (-0.0%) |
| 📄 JavaScript | 13.7 MB | 13.7 MB | -68.0 B (-0.0%) |
| 🎨 CSS | 108.8 KB | 108.8 KB | 0 B (0.0%) |
| 🌐 HTML | 0 B | 0 B | N/A |
| 📁 Other Assets | 496.7 KB | 496.7 KB | 0 B (0.0%) |
A detailed bundle diff analysis has been generated using Rsdoctor. You can download and view the interactive HTML report from the workflow artifacts.
📦 Download Link: Download Bundle Diff Report
Generated by Rsdoctor Action