mathiasbynens / emoji-regex

A regular expression to match all Emoji-only symbols as per the Unicode Standard.
https://mths.be/emoji-regex
MIT License
1.73k stars 174 forks source link

Published version’s es2015 output is incorrect #24

Closed ticky closed 7 years ago

ticky commented 7 years ago

Hi there,

It looks like the release cut after #22 (v6.5.0) was merged perhaps didn’t have dependencies bumped correctly when it was built, as the es2015 modules don’t match the output I expected!

They should start with;

module.exports = () => {
    // https://mathiasbynens.be/notes/es-unicode-property-escapes#emoji
    return (/\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074})\u{E007F}|\u{1F469}\u200D\u{1F469}\u200D.../gu
    );
};

But instead begin;


module.exports = () => {
    // https://mathiasbynens.be/notes/es-unicode-property-escapes#emoji
    return (/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|…/gu
    );
};

Could you do a new release and double check the dependencies (regexgen in particular!) are up to date? Unfortunately there’s no spec checking the format of the regex! 😅

mathiasbynens commented 7 years ago

Whoops! Should be fixed in v6.5.1.

Thanks for reporting!