Updated matching to remove redundant python versions.

This commit is contained in:
Matthew Brennan Jones 2015-07-26 18:41:26 -07:00
parent c3338f39c5
commit 6bd0af2a06

View File

@ -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');
}