SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 0 JavaScript

[React DevTools] Fix regex for formateWithStyles function (#24486)

The previous regex to detect string substitutions is not quite right, this PR fixes it by:

Check to make sure we are starting either at the beginning of the line or we match a character that's not % to make sure we capture all the % in a row.
Make sure there are an odd number of % (the first X pairs are escaped % characters. The odd % followed by a letter is the string substitution)
L
Luna Ruan committed
c7e494b55320768863b821be96896b28f0a280ef
Parent: 6cbf0f7
Committed by GitHub <noreply@github.com> on 5/3/2022, 10:52:56 PM