mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-27 04:40:35 +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() ===
|
username.toLowerCase().trim() ===
|
||||||
(displayName || '')
|
(displayName || '')
|
||||||
.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g, '') // Remove shortcodes, regex from https://regex101.com/r/iE9uV0/1
|
.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()
|
.toLowerCase()
|
||||||
.trim()
|
.trim()
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue