Use * instead of {0,}
This commit is contained in:
parent
57c94a394c
commit
e64ea74bbe
@ -530,13 +530,13 @@
|
||||
init: function() {
|
||||
var f, filter, key, m, _i, _len;
|
||||
for (key in config.filter) {
|
||||
if (!(m = conf[key].match(/^\/.+\/\w{0,}$/gm))) {
|
||||
if (!(m = conf[key].match(/^\/.+\/\w*$/gm))) {
|
||||
continue;
|
||||
}
|
||||
this.regexps[key] = [];
|
||||
for (_i = 0, _len = m.length; _i < _len; _i++) {
|
||||
filter = m[_i];
|
||||
f = filter.match(/^\/(.+)\/(\w{0,})$/);
|
||||
f = filter.match(/^\/(.+)\/(\w*)$/);
|
||||
this.regexps[key].push(RegExp(f[1], f[2]));
|
||||
}
|
||||
if (this.regexps[key].length) {
|
||||
|
||||
@ -386,11 +386,11 @@ filter =
|
||||
callbacks: []
|
||||
init: ->
|
||||
for key of config.filter
|
||||
unless m = conf[key].match /^\/.+\/\w{0,}$/gm
|
||||
unless m = conf[key].match /^\/.+\/\w*$/gm
|
||||
continue
|
||||
@regexps[key] = []
|
||||
for filter in m
|
||||
f = filter.match /^\/(.+)\/(\w{0,})$/
|
||||
f = filter.match /^\/(.+)\/(\w*)$/
|
||||
@regexps[key].push RegExp f[1], f[2]
|
||||
#only execute what's filterable
|
||||
@callbacks.push @[key] if @regexps[key].length
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user