-
Notifications
You must be signed in to change notification settings - Fork 931
feat(markdown): add support for [display text](mention:id) format #4468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Enhanced remarkMention plugin to parse both @username and [display text](mention:id) formats - Updated serialization to automatically use link format for mentions containing spaces or special characters - Added comprehensive tests for new mention format - Updated documentation with examples Co-authored-by: Ziad Beyens <[email protected]>
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
🦋 Changeset detectedLatest commit: d7b3228 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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@claude fix CI and do we need encoding/decoding like %20 for spaces? it makes it less readable in markdown |
|
Claude finished @zbeyens's task —— View job Tasks Completed:
Summary:CI Issues Fixed ✅
Space Encoding Analysis 📊After thorough investigation, URL encoding is necessary for the Why encoding is required:
Current behavior:
Alternatives explored but not viable:
Conclusion:While URL encoding makes the raw markdown less readable, it's the correct approach because:
The encoded portion is only visible when viewing raw markdown source, while rendered output shows the clean display text. |
…down validity - Added missing devDependencies to fix CI TypeScript errors - Reverted changes attempting to avoid URL encoding - URL encoding is required for valid markdown link syntax - The [text](mention:id) format requires valid URLs Co-authored-by: Ziad Beyens <[email protected]>
|
/test just fix the tests from the rules |
|
Claude finished @zbeyens's task —— View job Todo List:
Summary:I've successfully fixed the mention tests to follow the testing rules. The tests were mostly correct but needed a few adjustments: Changes Made:
Results:
The tests now follow the established patterns from other test files in the codebase and use the proper test utilities. |
- Move JSX pragma to first line in deserializeMentionLink.spec.tsx - Replace createPlateEditor with createTestEditor in both test files - Simplify test setup by using plugin array parameter - Tests now follow the established patterns from other test files Co-authored-by: Ziad Beyens <[email protected]>
|
@claude In [deserializeMentionLink.spec.tsx] (https://github.com/udecode/plate/pull/4468/files/dceeb35e971efbbe219a7c11bbc4d8cd433a1e3e#diff-eb8407fa6524ba5d6603e971f75bc3624bd3206e9e0bf1454ed3676e71173511) value should be display text while key should be mention id |
|
Claude finished @felixfeng33's task —— View job Todo List:
Summary:Successfully fixed the value/key mapping for mention links! ✅ Changes Made:
Results:
The implementation now correctly maps:
|
- value now contains display text - key contains mention ID (only for link-style mentions) - simple @mentions only have value property - maintains backward compatibility Co-authored-by: Felix Feng <[email protected]>
|
@claude You should add key to each cases in serializeMention.spec.ts. Never serialize as |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
1 similar comment
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude finished @felixfeng33's task —— View job Todo List:
Summary:Successfully updated the mention serialization to always use the Changes Made:
Note: There are existing build/test configuration issues in the markdown package that prevented running the tests locally, but the changes follow the established patterns and should work correctly. |
…) format - Updated mention serialization to always use link format - Added key property to all test cases - Updated expected output to use link format consistently Co-authored-by: Felix Feng <[email protected]>
|
@claude fix tests |
|
Claude finished @felixfeng33's task —— View job Todo List:
Summary:Fixed the failing tests! ✅ Changes made:
All 144 tests are now passing! 🎉 |
- Update regex pattern to exclude trailing punctuation from usernames - Update snapshot to expect new [display](mention:id) format - Fix test environment missing layout imports Co-authored-by: Felix Feng <[email protected]>
|
Claude finished @felixfeng33's task —— View job Todo List:
Summary:Documentation has been updated to reflect that we only support the Changes made:
The documentation now accurately reflects the current implementation where all mentions are serialized using the link format. |
- Remove references to simple @alice mention format - Update examples to only show [display text](mention:id) format - Update section title to reflect current implementation - Update MDX conversion table to show link format Co-authored-by: Felix Feng <[email protected]>
Closes #4467
Adds support for markdown mention format that allows spaces in display names:
[display text](mention:id)Changes
remarkMentionplugin to parse both@usernameand[display text](mention:id)formatsThe implementation maintains full backward compatibility with existing
@usernamementions.Generated with Claude Code