mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:20:59 +00:00
fix the regexps bugs
This commit is contained in:
parent
b5a2347e1d
commit
8ed6d06572
4
tree.go
4
tree.go
@ -106,7 +106,11 @@ func filterTreeWithPrefix(t *Tree, wildcards []string, reg string) {
|
|||||||
filterCards = append(filterCards, v)
|
filterCards = append(filterCards, v)
|
||||||
}
|
}
|
||||||
l.wildcards = filterCards
|
l.wildcards = filterCards
|
||||||
|
if l.regexps != nil {
|
||||||
l.regexps = regexp.MustCompile("^" + reg + strings.Trim(l.regexps.String(), "^$") + "$")
|
l.regexps = regexp.MustCompile("^" + reg + strings.Trim(l.regexps.String(), "^$") + "$")
|
||||||
|
} else {
|
||||||
|
l.regexps = regexp.MustCompile("^" + reg + "$")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if l.regexps != nil {
|
if l.regexps != nil {
|
||||||
filterCards := []string{}
|
filterCards := []string{}
|
||||||
|
Loading…
Reference in New Issue
Block a user