diff --git a/packages/react-dom-bindings/src/client/validateDOMNesting.js b/packages/react-dom-bindings/src/client/validateDOMNesting.js index 1470b96dd7a1d..eca9f0c30c64f 100644 --- a/packages/react-dom-bindings/src/client/validateDOMNesting.js +++ b/packages/react-dom-bindings/src/client/validateDOMNesting.js @@ -51,7 +51,7 @@ function describeAncestors( if (node !== null) { // Describe the node using the hydration diff logic. // Replace + with - to mark ancestor and child. It's kind of arbitrary. - return describeDiff(node).replace(/\n\+/g, '\n-'); + return describeDiff(node).replaceAll(/^[+-]/gm, '>'); } return ''; }