File tree Expand file tree Collapse file tree
packages/react-devtools-shared/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
12/**
23 * Copyright (c) Facebook, Inc. and its affiliates.
34 *
@@ -188,7 +189,7 @@ export function formatWithStyles(
188189 }
189190
190191 // 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;
192193 if ( inputArgs [ 0 ] . match ( REGEXP ) ) {
193194 return [ `%c${ inputArgs [ 0 ] } ` , style, ...inputArgs . slice ( 1 ) ] ;
194195 } else {
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ export function installHook(target: any): DevToolsHook | null {
189189 }
190190
191191 // 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;
193193 if ( inputArgs [ 0 ] . match ( REGEXP ) ) {
194194 return [ `%c${ inputArgs [ 0 ] } ` , style, ...inputArgs . slice ( 1 ) ] ;
195195 } else {
You can’t perform that action at this time.
0 commit comments