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

things that should not become emojis are becoming them #35

Open
markAtAthena opened this issue Sep 9, 2024 · 3 comments
Open

things that should not become emojis are becoming them #35

markAtAthena opened this issue Sep 9, 2024 · 3 comments

Comments

@markAtAthena
Copy link

markAtAthena commented Sep 9, 2024

image
@markAtAthena
Copy link
Author

I think this fixes it:

const RE_SHORT = /(?<=\s|^)[@$|*'",;.=:-)([]\/<>038BOopPsSdDxXzZ]{2,5}(?=\s|$|[.?!,])/g;

and then a test of:

image

all existing tests pass with that change.

@markAtAthena
Copy link
Author

@rhysd do you think this is the right solution?

@benkenawell
Copy link

benkenawell commented Oct 24, 2024

It's worth noting that look behind regular expressions aren't supported in iOS < 16.4. That's 18 months old, but it looks like there's still a decent user base where this could just blow up. I'm going to try using XRegExp* to patch that for now. I figure the support will only continue to increase, making it a moot point in ~a year or so.

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

2 participants