Improve emoji support: no commas
This commit is contained in:
parent
72f6a3e201
commit
4322f824ff
1 changed files with 6 additions and 3 deletions
|
@ -54,9 +54,12 @@ function populateChannelList() {
|
||||||
|
|
||||||
|
|
||||||
function transformMessageText(message) {
|
function transformMessageText(message) {
|
||||||
return message.split(/(?<=:|\W|^)(:[a-z0-9_-]+:)(?=:|\W|$)/).map(
|
return message
|
||||||
(x, i) => i % 2 ? emoji[x.slice(1, -1)] || x : x
|
.split(/(?<=:|\W|^)(:[a-z0-9_-]+:)(?=:|\W|$)/)
|
||||||
);
|
.map((x, i) => i % 2
|
||||||
|
? emoji[x.slice(1, -1)] || x
|
||||||
|
: x)
|
||||||
|
.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue