Skip to content
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

Usernames cannot have dots in them #14

Open
njt1982 opened this issue Oct 9, 2017 · 2 comments
Open

Usernames cannot have dots in them #14

njt1982 opened this issue Oct 9, 2017 · 2 comments

Comments

@njt1982
Copy link

njt1982 commented Oct 9, 2017

const pattern = new RegExp(`\\${boundary}${this.props.trigger}[a-z0-9_-]+|\\${boundary}${this.props.trigger}`, `gi`);

This assumes all usernames match that syntax.

We have a username with @first.lastname. The result of this code is that the keyword passed to our triggerCallback does not contain anything including and after the dot.

Suggest that the regex is exposed as a param and defaults to its current value?

@harshq
Copy link
Owner

harshq commented Oct 10, 2017

Good idea, You are welcome to send a PR if you have fixed it already. I'll fix this with the next release otherwise :)

@mrazadar
Copy link

Hey just published a new react-native-mentions package. Check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants