dillon1000/react

Commit

[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)
Browse files
Changed paths2 files
First-parent comparison
M packages/react-devtools-shared/src/backend/utils.js ModifiedM packages/react-devtools-shared/src/hook.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…