We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc5f14a commit c81141aCopy full SHA for c81141a
frontend/src/utils/getInitials/getInitials.tsx
@@ -11,7 +11,7 @@ export default (username: string): string => {
11
// Matches Unicode names including accented characters, Cyrillic,
12
// Arabic, Chinese, and other alphabets, plus hyphenated names (Jean-Pierre).
13
// \p{L} = Unicode letters, \p{M} = combining marks, 'gu' = global + Unicode flags
14
- const names = username.match(/[\p{L}\p{M}]+([-][\p{L}\p{M}]+)*/gu);
+ const names = username.match(/[\p{L}\p{M}]+(-[\p{L}\p{M}]+)*/gu);
15
let lastInitial = '';
16
17
if (!names) {
0 commit comments