File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -941,7 +941,7 @@ namespace ts {
941941 * Regex for the ** wildcard. Matches any number of subdirectories. When used for including
942942 * files or directories, does not match subdirectories that start with a . character
943943 */
944- const doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?"
944+ const doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?" ;
945945
946946 let pattern = "" ;
947947 let hasWrittenSubpattern = false ;
@@ -987,11 +987,11 @@ namespace ts {
987987 // The * and ? wildcards should not match directories or files that start with . if they
988988 // appear first in a component. Dotted directories and files can be included explicitly
989989 // like so: **/.*/.*
990- if ( startsWith ( component , "*" ) ) {
990+ if ( component . indexOf ( "*" ) === 0 ) {
991991 subpattern += "([^./]" + singleAsteriskRegexFragment + ")?" ;
992992 component = component . substr ( 1 ) ;
993993 }
994- else if ( startsWith ( component , "?" ) ) {
994+ else if ( component . indexOf ( "?" ) === 0 ) {
995995 subpattern += "[^./]" ;
996996 component = component . substr ( 1 ) ;
997997 }
You can’t perform that action at this time.
0 commit comments