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 (
|
if (
|
||||||
!short &&
|
!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;
|
username = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue