feat: Code mark input rule edge case (BLO-938)#2698
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant User as User (typing)
participant Editor as Editor/InputRules
participant Schema as Schema/Document
User->>Editor: type backtick(s), text, closing backtick, then space
Editor->>Editor: match custom InputRule (backticked text + space)
Editor->>Schema: create marked text node (Code) and text node (space)
Schema-->>Editor: updated document fragment
Editor-->>User: render inline code with trailing space
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.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: |
nperez0111
left a comment
There was a problem hiding this comment.
Works from what I can tell
Summary
The code mark/style has an input rule which converts text wrapped in backticks into code. However, it misses an edge case where the user inputs 2 backticks, then enters text between them and adds a space after. This PR adds an additional input rule for this case.
Closes #1970
Rationale
While minor, this is a nice improvement to UX.
Changes
CodeTipTap mark with additional input rule.Impact
N/A
Testing
N/A
Screenshots/Video
N/A
Checklist
Additional Notes
N/A
Summary by CodeRabbit