From 6d6bcd74baef0b0d5a851b5b6798cd2831a831d1 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Mon, 27 Sep 2021 11:47:57 +0800 Subject: [PATCH] update --- core/test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/test.go b/core/test.go index 376bc55..c0b3d94 100644 --- a/core/test.go +++ b/core/test.go @@ -121,6 +121,11 @@ func initSys() { s.Disappear() ss := []string{} for _, f := range functions { + for i := range f.Rules { + f.Rules[i] = strings.Trim(f.Rules[i], "^$") + f.Rules[i] = strings.Replace(f.Rules[i], `\s+`, " ", -1) + f.Rules[i] = strings.Replace(f.Rules[i], `(\S+)`, "?", -1) + } ss = append(ss, strings.Join(f.Rules, " ")) } return strings.Join(ss, "\n")