praneshr / react-diff-viewer

A simple and beautiful text diff viewer component made with Diff and React.
https://praneshravi.in/react-diff-viewer/
MIT License
1.46k stars 277 forks source link

When splitView is set to false, both line numbers still show up #79

Closed RyanWarner closed 4 years ago

RyanWarner commented 4 years ago

Thank you for the amazing library.

I'm seeing two columns for line numbers in unified view, which seems unintended (correct me if I'm wrong!).

See this codesandbox: https://codesandbox.io/s/blissful-jepsen-kx7zi?file=/src/App.js

Screen Shot 2020-04-22 at 5 05 41 PM

praneshr commented 4 years ago

Thanks for the question. Yes, it is intentional. Left column page number represents the old file and the right column represents the new file. Just like Github diff.

Ref: https://github.com/praneshr/react-diff-viewer/commit/37e4418874fea6be08576230c300c44ad1df7f03?diff=unified