1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-23 10:17:24 +00:00

fixed error where unicode emojis were missing

This commit is contained in:
2019-10-26 14:54:43 -06:00
parent 2fb6bb0bc0
commit de5f7da139

View File

@ -15,12 +15,12 @@ type emojiData struct {
} }
func emojiUnicodeConvert(s string) string { func emojiUnicodeConvert(s string) string {
re := regexp.MustCompile(`:\w+:`) re := regexp.MustCompile(`:(\w+|([+-]\d)):`)
return re.ReplaceAllStringFunc(s, renderUnicodeEmoji) return re.ReplaceAllStringFunc(s, renderUnicodeEmoji)
} }
func resolveRootEmojis(s string) string { func resolveRootEmojis(s string) string {
re := regexp.MustCompile(`:\w+:`) re := regexp.MustCompile(`:(\w+|([+-]\d)):`)
return re.ReplaceAllStringFunc(s, emojiRootLookup) return re.ReplaceAllStringFunc(s, emojiRootLookup)
} }