Skip to content
Commit f3fcb2ff authored by Lukas Eipert's avatar Lukas Eipert
Browse files

fix(Avatar): Add support for multiple-character emojis

Currently the `getAvatarChar` helper only returns the first emoji if the
emoji is actually composed of multiple emoji (e.g. pirate flag, emoji
with gender / skin-color modifiers). This fixes that.

Furthermore we got a report in
gitlab-org/gitlab#349420 that older browsers
break with the Unicode property escapes [ref].

We already use the npm-module `emoji-regex` in GitLab to detect emoji
and it is backwards compatible with those older browsers.

[ref]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes
parent 6ded14f7
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment