wasmerio / winterjs

Winter is coming... ❄️

Home Page:https://winterjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid property name in regular expression

ayonli opened this issue · comments

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.

Thanks for the issue report, @ayonli. This has been fixed in wasmerio/mozjs@51b9e77 and wasmerio/mozjs@a408521, and will be published as part of the next version (1.2.0).