dillon1000/react
Commit
Browse files Ignore CR/LF differences when warning about markup mismatch (#11119)
* Add regression test for CR-insensitive hydration * Normalize CR when comparing server HTML to DOM * Move tests in the file * Add a failing test for comparing attributes * Normalize CR for attributes too * Add a test case for CR in dangerouslySetInnerHTML * Undo the fix per feedback * Change the fix to be DEV-only and still patch up LF -> CR * Remove the dangerouslySetInnerHTML test It's always going to "pass" because we normalize HTML anyway. Except that it won't pass because we intentionally don't patch up dangerouslyInnerHTML. * Fix issue that Flow failed to catch * Add null character tests * Normalize both client and server value for the warning * Fix the bug * Normalize replacement character away as well * Fix outdated comment
Changed paths2 files
First-parent comparisonsrc/renderers/dom/fiber/ReactDOMFiberComponent.js ModifiedM src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…