-
Notifications
You must be signed in to change notification settings - Fork 1.1k
adding mentionTrigger #320
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
mentionSuggestions: mentionSuggestionsStyles.mentionSuggestions, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spaces where here by intention to make it easy to distinct which component is affected. Maybe a comment would have been better. Can you add comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize I made these changes. I'll add some comments.
@@ -1,9 +1,8 @@ | |||
/* @flow */ | |||
|
|||
import findWithRegex from 'find-with-regex'; | |||
import _ from 'lodash'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not ideal, as it would include the whole lodash library. By using import escapeRegExp from 'lodash/escapeRegExp'
we can reduce the imported code and skip all other lodash code not necessary for this plugin.
Some related improvements here #344 |
Addresses #253 (comment).
Adds
mentionTrigger
toconfig
with default value of@
.Adds and searches for mention entities with key of
'mention' + mentionTrigger
mentionStrategy
andmentionSuggestionsStrategy
takes the trigger as a parameter.Feedback welcome