Browse Source

fixed error where unicode emojis were missing

pull/34/head
David Haukeness 5 years ago
parent
commit
de5f7da139
No known key found for this signature in database
GPG Key ID: A7F1091956853EF9
  1. 4
      emojiMap.go

4
emojiMap.go

@ -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)
} }

Loading…
Cancel
Save