Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants