File tree 2 files changed +3
-2
lines changed
packages/react-devtools-shared/src
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change
1
+ /**
1
2
/**
2
3
* Copyright (c) Facebook, Inc. and its affiliates.
3
4
*
@@ -188,7 +189,7 @@ export function formatWithStyles(
188
189
}
189
190
190
191
// Matches any of %(o|O|d|i|s|f), but not %%(o|O|d|i|s|f)
191
- const REGEXP = / ( [ ^ % ] | ^ ) ( % ( [ o O d i s f ] ) ) / g;
192
+ const REGEXP = / ( [ ^ % ] | ^ ) ( ( % % ) * ) ( % ( [ o O d i s f ] ) ) / g;
192
193
if ( inputArgs [ 0 ] . match ( REGEXP ) ) {
193
194
return [ `%c${ inputArgs [ 0 ] } ` , style, ...inputArgs . slice ( 1 ) ] ;
194
195
} else {
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ export function installHook(target: any): DevToolsHook | null {
189
189
}
190
190
191
191
// Matches any of %(o|O|d|i|s|f), but not %%(o|O|d|i|s|f)
192
- const REGEXP = / ( [ ^ % ] | ^ ) ( % ( [ o O d i s f ] ) ) / g;
192
+ const REGEXP = / ( [ ^ % ] | ^ ) ( ( % % ) * ) ( % ( [ o O d i s f ] ) ) / g;
193
193
if ( inputArgs [ 0 ] . match ( REGEXP ) ) {
194
194
return [ `%c${ inputArgs [ 0 ] } ` , style, ...inputArgs . slice ( 1 ) ] ;
195
195
} else {
You can’t perform that action at this time.
0 commit comments