diff --git a/plugin/word_count/word_count.go b/plugin/word_count/word_count.go index f261ab7c39..e5206223f2 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