Commits

Kazunori Ninomiya committed 39faf8f

Changed the pattern matching method.

Comments (0)

Files changed (1)

 
   function getSrc(file, options)
   {
-    var re, length
-      , src  = file.src
+    var src  = file.src
       , orig = _.clone(file.orig)
       , root = options.root
       ;
 
     switch (grunt.util.kindOf(root)) {
       case 'object':
-        re = orig.src.map(function(v) {
-          return new RegExp(v.replace('*', '.*'));
-        });
-        length = re.length;
         src = Object.keys(root).filter(function(key) {
-          var i = length;
+          var i = orig.src.length;
           while (i--) {
-            if (re[i].test(key)) {
+            if (grunt.file.minimatch(key, orig.src[i])) {
               return true;
             }
           }