File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 66 NumberPrototypeToFixed,
77 ObjectDefineProperty,
88 RegExp,
9+ RegExpEscape,
910 RegExpPrototypeExec,
1011 SafeArrayIterator,
1112 SafeMap,
@@ -33,9 +34,9 @@ function initializeDebugEnv(debugEnv) {
3334 debugImpls = { __proto__ : null } ;
3435 if ( debugEnv ) {
3536 // This is run before any user code, it's OK not to use primordials.
36- debugEnv = debugEnv . replace ( / [ | \\ { } ( ) [ \] ^ $ + ? . ] / g , '\\$&' )
37- . replaceAll ( '*' , '. *' )
38- . replaceAll ( ',' , '$|^' ) ;
37+ debugEnv = RegExpEscape ( debugEnv )
38+ . replaceAll ( / (?< = [ ^ \\ ] | ^ ) \\ \* / g , '[^.] *' )
39+ . replaceAll ( RegExpEscape ( ',' ) , '$|^' ) ;
3940 const debugEnvRegex = new RegExp ( `^${ debugEnv } $` , 'i' ) ;
4041 testEnabled = ( str ) => RegExpPrototypeExec ( debugEnvRegex , str ) !== null ;
4142 } else {
You can’t perform that action at this time.
0 commit comments