wasmerio / winterjs

Winter is coming... ❄️
https://winterjs.org/
MIT License
3.04k stars 53 forks source link

invalid property name in regular expression #80

Closed ayonli closed 5 months ago

ayonli commented 6 months ago

The following regular express failed to compile:

const EMOJI_RE = /^(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F)(?:\u200d(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F))*$/u; 

The program reported a SyntaxError, saying that 'invalid property name in the regular expression'.

However, the regex works well in Firefox, as well as other browsers and runtimes.

Arshia001 commented 5 months ago

Thanks for the issue report, @ayonli. This has been fixed in https://github.com/wasmerio/mozjs/commit/51b9e77762ae051d38675453a897d87f04810314 and https://github.com/wasmerio/mozjs/commit/a408521096a0f8530993fee6b5efebf9396d51be, and will be published as part of the next version (1.2.0).