Conversation
🦋 Changeset detectedLatest commit: 454819c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
cherry-markdown
@cherry-markdown/milkdown
@cherry-markdown/miniprogram
commit: |
Collaborator
🌐 Playground 预览 |
Contributor
|
Size Change: +10.8 kB (+0.15%) Total Size: 6.98 MB 📦 View Changed
ℹ️ View Unchanged
|
RSS1102
marked this pull request as draft
August 4, 2026 02:30
RSS1102
force-pushed
the
rss1102/feat-milkdown-package
branch
from
August 8, 2026 23:58
d58138b to
25da568
Compare
Collaborator
🔌 VSCode Plugin 构建产物
|
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@cherry-markdown/milkdown扩展,以extensions: [milkdown()]按 Cherry 实例启用 Milkdown 即见即所得预览编辑。getMarkdown()和 CodeMirror 源码区双向同步,避免快速输入、API 更新、模式切换造成回退或回环。examples/assets/markdown/index.md和原双栏页面;同时提供 React/Vite 工程化 demo 与发布包 consumer fixture。Package contract
安装
@cherry-markdown/milkdown时由使用方提供 peer dependencies:cherry-markdown、@milkdown/kit、mathlive;mermaid为 optional peer dependency。推荐用法:
保留
attachCherryMilkdownPreview()和createCherryMilkdown()兼容入口;推荐路径统一为按实例启用milkdown()。Milkdown 复用当前 Cherry 实例的 Engine 和 renderer,不重复打包 Cherry 或创建第二套 Markdown 状态。
Validation
Automated
yarn typecheck:milkdown、yarn typecheck:core。yarn build:milkdown、yarn workspace @cherry-markdown/milkdown build:demo。node packages/milkdown/scripts/verify-consumer.mjs:从打包后的真实包和公开 peer dependencies 构建 consumer fixture。MILKDOWN_E2E_PORT=4178 yarn test:e2e:milkdown:Chromium 13/13 passed,覆盖双向同步、表格 ECharts、图片、Mermaid、代码块、标题、目录/链接、工具栏、搜索、模式切换和 mount/destroy 压力。git diff --check。Browser smoke check
pageerror、未处理 Promise、console.error和 renderer error 均为空。Scope
@cherry-markdown/engine独立源码层、core到engine/src/syntax的迁移或 Cherry 主编辑器替换。