mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-28 20:28:52 +03:00
Even shorter name text
This commit is contained in:
parent
eef658b758
commit
c77ed16804
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,8 @@ function NameText({ account, showAvatar, showAcct, short, external, onClick }) {
|
|||
username.toLowerCase().trim() ===
|
||||
(displayName || '')
|
||||
.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g, '') // Remove shortcodes, regex from https://regex101.com/r/iE9uV0/1
|
||||
.replace(/\s+/g, '') // E.g. "My name" === "myname"
|
||||
.replace(/[^a-z0-9]/gi, '') // Remove non-alphanumeric characters
|
||||
.toLowerCase()
|
||||
.trim()
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue