fix: Inline code clears comments (BLO-1207)#2832
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughCode marks now allow comment marks to overlap by removing the comment mark from the exclusion list when the mark is created. A lifecycle hook filters the exclusion list conditionally, and an end-to-end test validates that comments and inline code coexist on the same text selection. ChangesCode and Comment Mark Overlap
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
|
Summary
This PR fixes an issues where comments cannot overlap inline code. This is because the inline code mark has
exclude: "_"in its spec, meaning no other marks can overlap it. This makes sense for things like colors and bold/italic/etc, but not comments. Therefore, an exception has been added.Closes #2803
Rationale
This is a bug.
Changes
Codemark withonBeforeCreateto remove the comment mark from theexcludearray.Impact
N/A
Testing
Added e2e test.
Screenshots/Video
N/A
Checklist
Additional Notes
N/A
Summary by CodeRabbit