🐛 修复 emoji 转化后不正常显示的 BUG
This commit is contained in:
parent
1079cf47fe
commit
00f7ca4f93
5
emoji.go
5
emoji.go
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user