mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 07:11:15 +03:00
username = displayName matching, minus the shortcodes
This commit is contained in:
parent
4e60cae42c
commit
9a0f538d69
1 changed files with 5 additions and 1 deletions
|
@ -13,7 +13,11 @@ function NameText({ account, showAvatar, showAcct, short, external }) {
|
|||
|
||||
if (
|
||||
!short &&
|
||||
username.toLowerCase().trim() === (displayName || '').toLowerCase().trim()
|
||||
username.toLowerCase().trim() ===
|
||||
(displayName || '')
|
||||
.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g, '') // Remove shortcodes, regex from https://regex101.com/r/iE9uV0/1
|
||||
.toLowerCase()
|
||||
.trim()
|
||||
) {
|
||||
username = null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue