Fix file type check.

This commit is contained in:
Lars Jung 2014-06-24 03:07:35 +02:00
parent be827bac72
commit 99d59ee9ad

View File

@ -14,7 +14,7 @@ modulejs.define('core/types', ['config', '_'], function (config, _) {
_.each(types, function (patterns, type) {
var pattern = '^' + _.map(patterns, function (p) { return escapeRegExp(p).replace(/\*/g, '.*'); }).join('|') + '$';
var pattern = '^(' + _.map(patterns, function (p) { return '(' + escapeRegExp(p).replace(/\*/g, '.*') + ')'; }).join('|') + ')$';
regexps[type] = new RegExp(pattern, 'i');
});
},