8ed6d065 by astaxie

fix the regexps bugs

1 parent b5a2347e
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 {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!