linkify-it: linkify.match gets stuck with string containing a lot of emoji
We (the company I work at) run linkify-it on various email/text content to auto-link stuff. It works pretty great, however we encountered some cases where the .match function gets stuck because of a big (?) number of emoji/unicode character. Here is one of those string as an example (with fake text for privacy)
https://gist.github.com/eramdam/d743452c916e90ff7b42720f4384088e
I managed to avoid the hang by setting fuzzyLink: true so I guess the regexes used for that are probably subject to slowness on such strings.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (11 by maintainers)
Commits related to this issue
- Bump uc.micro dependency, fix #36 — committed to AxonixRTB/linkify-it by deleted user 8 years ago
I’ve asked guys from disapora & npm to inspect this change for sure. If they will not find any edge cases, i’ll do “official” release.
Fixed
Thanks for your help!
New install will load fixed
uc.micro, but i released a new version with bumped dependencies for sure.