Tweaked the regexp for Clojars

As per @espadrine's suggestion, slimmed down the regexp, as the previous
one was sub optimal.
This commit is contained in:
Александар Симић 2015-04-18 19:09:57 +01:00
parent 1dc9108d99
commit f9fa73c3ef

View File

@ -1089,7 +1089,7 @@ cache(function(data, match, sendBadge, request) {
}));
// Clojars version integration
camp.route(/^\/clojars\/v\/(.+)((\/)(.+))?\.(svg|png|gif|jpg|json)$/,
camp.route(/^\/clojars\/v\/(.+)\.(svg|png|gif|jpg|json)$/,
cache(function(data, match, sendBadge, request) {
var clojar = match[1]; // eg, `prismic` or `foo/bar`.
var format = match[2];