From 9ab7df5f47fe91d0bbffa61d9700671b002f4523 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 15 May 2015 17:42:10 +0100 Subject: [PATCH] remove wildcards from start of patterns --- src/babel/util.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/babel/util.js b/src/babel/util.js index 6ee855709d..7382a5d127 100644 --- a/src/babel/util.js +++ b/src/babel/util.js @@ -76,8 +76,9 @@ export function regexify(val: any): RegExp { // normalise path separators val = slash(val); - // remove relative separator if present - if (startsWith(val, "./")) val = val.slice(2); + // remove starting wildcards or relative separator if present + if (startsWith(val, "./") || startsWith(val, "*/")) val = val.slice(2); + if (startsWith(val, "**/")) val = val.slice(3); var regex = minimatch.makeRe(val, { nocase: true }); return new RegExp(regex.source.slice(1, -1), "i");