diff options
author | Wim <wim@42.be> | 2023-03-09 22:48:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 22:48:00 +0100 |
commit | 08779c29099e8940493df56d28d8aa131ac8342e (patch) | |
tree | 7ad8ce25cf371e582137e1706dd671a6bf4342d0 /vendor/github.com/kyokomi/emoji/v2 | |
parent | d5f9cdf912d43cd2a5cb243e086fbdab9a9073b0 (diff) | |
download | matterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.tar.gz matterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.tar.bz2 matterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.zip |
Update dependencies (#2007)
* Update dependencies
Diffstat (limited to 'vendor/github.com/kyokomi/emoji/v2')
-rw-r--r-- | vendor/github.com/kyokomi/emoji/v2/emoji.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/kyokomi/emoji/v2/emoji.go b/vendor/github.com/kyokomi/emoji/v2/emoji.go index 6913a2ea..245e2f0e 100644 --- a/vendor/github.com/kyokomi/emoji/v2/emoji.go +++ b/vendor/github.com/kyokomi/emoji/v2/emoji.go @@ -49,7 +49,8 @@ func NormalizeShortCode(shortCode string) string { // regular expression that matches :flag-[countrycode]: var flagRegexp = regexp.MustCompile(":flag-([a-z]{2}):") -func emojize(x string) string { +// Emojize Converts the string passed as an argument to a emoji. For unsupported emoji, the string passed as an argument is returned as is. +func Emojize(x string) string { str, ok := emojiCode()[x] if ok { return str + ReplacePadding @@ -83,7 +84,7 @@ func replaseEmoji(input *bytes.Buffer) string { case unicode.IsSpace(i): return emoji.String() case i == ':': - return emojize(emoji.String()) + return Emojize(emoji.String()) } } } |