From 3553683bb19daf1707de8cc25b4ceb30b846dbbe Mon Sep 17 00:00:00 2001 From: himawari <54976075+guohuiyuan@users.noreply.github.com> Date: Tue, 19 Apr 2022 23:00:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E5=85=BC=E5=AE=B9linux=E5=92=8C?= =?UTF-8?q?windows=E6=96=87=E4=BB=B6=E6=8D=A2=E8=A1=8C=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=20(#199)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/word_count/word_count.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/word_count/word_count.go b/plugin/word_count/word_count.go index f261ab7c..e5206223 100644 --- a/plugin/word_count/word_count.go +++ b/plugin/word_count/word_count.go @@ -48,7 +48,7 @@ func init() { ctx.SendChain(message.Text("ERROR:", err)) return false } - stopwords = strings.Split(binary.BytesToString(data), "\r\n") + stopwords = strings.Split(strings.ReplaceAll(binary.BytesToString(data), "\r", ""), "\n") sort.Strings(stopwords) logrus.Infoln("[wordcount]加载", len(stopwords), "条停用词") return true