From 08779c29099e8940493df56d28d8aa131ac8342e Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 9 Mar 2023 22:48:00 +0100 Subject: Update dependencies (#2007) * Update dependencies --- vendor/github.com/kyokomi/emoji/v2/emoji.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/kyokomi/emoji/v2/emoji.go') 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()) } } } -- cgit v1.2.3