Updated matching to remove redundant python versions.
This commit is contained in:
parent
c3338f39c5
commit
6bd0af2a06
|
@ -1639,6 +1639,15 @@ cache(function(data, match, sendBadge, request) {
|
|||
versions.push(matched[1]);
|
||||
}
|
||||
}
|
||||
['2', '3'].forEach(function(version) {
|
||||
if (versions.some(function(element, index, array) { return new RegExp('^' + version + '\\.\\d$').exec(element); })) {
|
||||
versions.forEach(function(element, index, array) {
|
||||
if (element === version) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (!versions.length) {
|
||||
versions.push('not found');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user