🐛 修复 emoji 转化后不正常显示的 BUG

This commit is contained in:
eatMoreApple 2021-05-10 23:48:48 +08:00
parent 1079cf47fe
commit 00f7ca4f93

View File

@ -1,7 +1,9 @@
package openwechat package openwechat
import ( import (
"html"
"regexp" "regexp"
"strconv"
"strings" "strings"
) )
@ -285,9 +287,6 @@ var Emoji = struct {
func FormatEmoji(text string) string { func FormatEmoji(text string) string {
result := emojiRegexp.FindAllStringSubmatch(text, -1) result := emojiRegexp.FindAllStringSubmatch(text, -1)
if len(result) == 0 {
return text
}
for _, item := range result { for _, item := range result {
if len(item) != 2 { if len(item) != 2 {