This commit is contained in:
cdle
2021-09-27 11:47:57 +08:00
parent 96919032fc
commit 6d6bcd74ba
+5
View File
@@ -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")