Skip to content

Commit c81141a

Browse files
committed
sonar cloud
1 parent dc5f14a commit c81141a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/utils/getInitials/getInitials.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default (username: string): string => {
1111
// Matches Unicode names including accented characters, Cyrillic,
1212
// Arabic, Chinese, and other alphabets, plus hyphenated names (Jean-Pierre).
1313
// \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);
14+
const names = username.match(/[\p{L}\p{M}]+(-[\p{L}\p{M}]+)*/gu);
1515
let lastInitial = '';
1616

1717
if (!names) {

0 commit comments

Comments
 (0)