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

Bug: android on hermes #37

Closed
beqramo opened this issue Feb 26, 2021 · 4 comments
Closed

Bug: android on hermes #37

beqramo opened this issue Feb 26, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@beqramo
Copy link

beqramo commented Feb 26, 2021

Hi,

on android with Hermes, there is a problem with regex
SyntaxError: 268576:22:Invalid regular expression: Quantifier has nothing to repeat, js engine: Hermes

because Hermes doesn't support named capture groups yet facebook/hermes#89

and as I see you are using it here:

const mentionRegEx = /(?<original>(?<trigger>.)\[(?<name>[^[]*)]\((?<id>[^(]*)\))/gi;

@dabakovich dabakovich added the bug Something isn't working label Feb 26, 2021
dabakovich added a commit that referenced this issue Feb 28, 2021
Some devices (iOS < v12, Hermes) doesn't support named capture groups that we are using for mention part types. So we should replace this by not named capture groups. Need to test it.

#23, #37
@dabakovich
Copy link
Owner

Thanks for your feedback!
I replaced named capture groups with simple capture groups. Can you check if it fixed your issue?
The fix is published as npm alpha v2.2.4-0 release.

@beqramo
Copy link
Author

beqramo commented Feb 28, 2021

thanks, I will check it tomorrow.

@beqramo
Copy link
Author

beqramo commented Mar 1, 2021

done. it works. I'm closing it.

@beqramo beqramo closed this as completed Mar 1, 2021
@dabakovich
Copy link
Owner

Just published the v2.2.4 release with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants