Aeolun / react-diff-viewer-continued

A simple and beautiful text diff viewer component made with Diff and React.
https://aeolun.github.io/react-diff-viewer-continued/
MIT License
113 stars 34 forks source link

Render new lines in diff #14

Closed jakeleventhal closed 1 year ago

jakeleventhal commented 1 year ago

If i have json in the diff viewer, it shows the json properly, but new lines are rendered as "\n" instead of actual new lines

jakeleventhal commented 1 year ago
const newData = {
    key1: `value
    newline value
    \n
    another new line`
  };
Screenshot 2023-01-06 at 2 22 25 PM