Conversation
🦋 Changeset detectedLatest commit: 4747636 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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/miniprogram
commit: |
|
Size Change: -609 B (-0.01%) Total Size: 7.57 MB 📦 View Changed
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #1842 by normalizing how inline code handles line breaks (replacing them with spaces), which removes unintended whitespace/newline artifacts in rendered HTML. It also adjusts the Transfer hook implementation and corresponding tests/snapshots to align with the updated rendering behavior.
Changes:
- Update inline-code rendering to replace
\nwith spaces during inline code processing. - Refactor
Transferhook to extendParagraphBase, simplify its behavior, and adjust hook ordering. - Update affected unit tests and CommonMark snapshot expectations; add a patch changeset entry.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cherry-markdown/test/core/hooks/Transfer.spec.ts | Updates Transfer tests to match the new constructor usage and removes the no-longer-relevant post-render token restoration test. |
| packages/cherry-markdown/test/core/snapshots/CommonMark.spec.ts.snap | Updates snapshots reflecting inline code newlines being rendered as spaces instead of literal line breaks. |
| packages/cherry-markdown/src/core/HooksConfig.js | Moves Transfer earlier in the paragraph hook execution order. |
| packages/cherry-markdown/src/core/hooks/Transfer.js | Refactors Transfer to extend ParagraphBase, adds constructor, keeps only the pre-render escape-line-ending fix and a no-op makeHtml. |
| packages/cherry-markdown/src/core/hooks/CodeBlock.js | Replaces inline-code internal newlines with spaces during inline code processing and removes unused special-char replacement logic. |
| .changeset/bright-zoos-hang.md | Adds a patch changeset for the fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔌 VSCode Plugin 构建产物
|
🌐 Playground 预览 |
|
📦 cherry-markdown dev published —
pnpm: pnpm add cherry-markdown@npm:@cherry-markdown/cherry-markdown-dev@0.11.8-202608040338.3dd4cb7yarn: yarn add cherry-markdown@npm:@cherry-markdown/cherry-markdown-dev@0.11.8-202608040338.3dd4cb7npm: npm i cherry-markdown@npm:@cherry-markdown/cherry-markdown-dev@0.11.8-202608040338.3dd4cb7npm overrides:(写入 {
"overrides": {
"cherry-markdown": "npm:@cherry-markdown/cherry-markdown-dev@0.11.8-202608040338.3dd4cb7"
}
}yarn resolutions:(写入 {
"resolutions": {
"cherry-markdown": "npm:@cherry-markdown/cherry-markdown-dev@0.11.8-202608040338.3dd4cb7"
}
}pnpm.overrides:(写入 {
"pnpm": {
"overrides": {
"cherry-markdown": "npm:@cherry-markdown/cherry-markdown-dev@0.11.8-202608040338.3dd4cb7"
}
}
} |
No description provided.