Repository navigation
fix(markdown): render task continuations as text - #11008
Conversation
📝 WalkthroughWalkthroughThe rich Markdown editor now uses a custom task-list extension that normalizes indented code tokens within task items and recursively processes nested tokens. The extension registration was updated accordingly, with round-trip tests covering continuation text and indented code blocks. Task-list CSS selectors were narrowed to direct child items, and a test verifies the scoped layout rule. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/renderer/src/components/editor/markdown-round-trip.test.ts (2)
284-303: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover recursive normalization with a nested task item.
This case nests ordinary bullets, but it does not exercise the recursive
taskItempath innormalizeTaskListToken. Add a nested checked/unchecked task item with aligned continuation text so regressions in nested normalization are detected.
305-307: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert preserved code content and nesting, not only fences.
toContain('```')can pass even ifecho okis lost or moved outside the task item. Assert the canonical round-trip output, or at minimum verify the code content and its task-item placement.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 12732732-4ef2-4ff4-bfbe-c98d4466ba94
📒 Files selected for processing (5)
src/renderer/src/assets/rich-markdown-editor.csssrc/renderer/src/assets/rich-markdown-task-list-style.test.tssrc/renderer/src/components/editor/markdown-round-trip.test.tssrc/renderer/src/components/editor/rich-markdown-extensions.tssrc/renderer/src/components/editor/rich-markdown-task-list.ts
Summary
Test plan
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/editor/markdown-round-trip.test.ts src/renderer/src/components/editor/markdown-dirty-state.test.ts src/renderer/src/components/editor/rich-markdown-tab-key-handler.test.ts src/renderer/src/assets/rich-markdown-task-list-style.test.tspnpm exec tsc --noEmit -p config/tsconfig.tc.web.jsonoxlintpnpm run check:max-lines-ratchetgit diff --check