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