fix the regexps bugs
Showing
1 changed file
with
4 additions
and
0 deletions
| ... | @@ -106,8 +106,12 @@ func filterTreeWithPrefix(t *Tree, wildcards []string, reg string) { | ... | @@ -106,8 +106,12 @@ func filterTreeWithPrefix(t *Tree, wildcards []string, reg string) { |
| 106 | filterCards = append(filterCards, v) | 106 | filterCards = append(filterCards, v) |
| 107 | } | 107 | } |
| 108 | l.wildcards = filterCards | 108 | l.wildcards = filterCards |
| 109 | if l.regexps != nil { | ||
| 109 | l.regexps = regexp.MustCompile("^" + reg + strings.Trim(l.regexps.String(), "^$") + "$") | 110 | l.regexps = regexp.MustCompile("^" + reg + strings.Trim(l.regexps.String(), "^$") + "$") |
| 110 | } else { | 111 | } else { |
| 112 | l.regexps = regexp.MustCompile("^" + reg + "$") | ||
| 113 | } | ||
| 114 | } else { | ||
| 111 | if l.regexps != nil { | 115 | if l.regexps != nil { |
| 112 | filterCards := []string{} | 116 | filterCards := []string{} |
| 113 | for _, v := range l.wildcards { | 117 | for _, v := range l.wildcards { | ... | ... |
-
Please register or sign in to post a comment