From 00f7ca4f93932bb14178882beeb319c6f6c134c0 Mon Sep 17 00:00:00 2001 From: eatMoreApple <15055461510@163.com> Date: Mon, 10 May 2021 23:48:48 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=20emoji=20?= =?UTF-8?q?=E8=BD=AC=E5=8C=96=E5=90=8E=E4=B8=8D=E6=AD=A3=E5=B8=B8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emoji.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/emoji.go b/emoji.go index e533c51..fc5ddc7 100644 --- a/emoji.go +++ b/emoji.go @@ -1,7 +1,9 @@ package openwechat import ( + "html" "regexp" + "strconv" "strings" ) @@ -285,9 +287,6 @@ var Emoji = struct { func FormatEmoji(text string) string { result := emojiRegexp.FindAllStringSubmatch(text, -1) - if len(result) == 0 { - return text - } for _, item := range result { if len(item) != 2 {