File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,20 @@ package config
22
33import (
44 "github.com/wechaty/go-wechaty/wechaty-puppet/filebox"
5+ "regexp"
56)
67
78// AtSepratorRegex mobile: \u2005, PC、mac: \u0020
9+ // Deprecated: use AtSeparatorRegexStr
810const AtSepratorRegex = "[\u2005 \u0020 ]"
911
12+ // AtSeparatorRegexStr mobile: \u2005, PC、mac: \u0020
13+ const AtSeparatorRegexStr = "[\u2005 \u0020 ]"
14+
1015const FourPerEmSpace = string (rune (8197 ))
1116
17+ var AtSeparatorRegex = regexp .MustCompile (AtSeparatorRegexStr )
18+
1219func QRCodeForChatie () * filebox.FileBox {
1320 const chatieOfficialAccountQrcode = "http://weixin.qq.com/r/qymXj7DEO_1ErfTs93y5"
1421 return filebox .FromQRCode (chatieOfficialAccountQrcode )
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ func (m *Message) MentionList() []_interface.IContact {
257257 return contactList
258258 }
259259
260- atList := strings . Split (m .Text (), config . AtSepratorRegex )
260+ atList := config . AtSeparatorRegex . Split (m .Text (), - 1 )
261261 if len (atList ) == 0 {
262262 return nil
263263 }
You can’t perform that action at this time.
0 commit comments