add custom emoticons
This commit is contained in:
parent
492a41f19b
commit
daab6ef78b
1 changed files with 4 additions and 1 deletions
|
@ -174,7 +174,10 @@ const Util = {
|
|||
text = text.replace(new RegExp(escapeRegExp(emoji.colons), 'g'), emoji.native)
|
||||
})
|
||||
if (opts.emoticons) {
|
||||
Object.keys(emojiIndex.emoticons).forEach(emoticon => {
|
||||
const emoticons = Object.assign({}, emojiIndex.emoticons, {
|
||||
':D': ':grin:'
|
||||
})
|
||||
Object.keys(emoticons).forEach(emoticon => {
|
||||
const key = emojiIndex.emoticons[emoticon]
|
||||
const emoji = emojiIndex.emojis[key]
|
||||
text = text.replace(new RegExp(escapeRegExp(emoticon), 'g'), emoji.native)
|
||||
|
|
Loading…
Reference in a new issue