-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to prefer single line changes instead of multi-line? #91
Comments
Have you had any luck on doing this with the actual library? |
Try using |
3 tasks
DavidGamba
added a commit
to DavidGamba/dap
that referenced
this issue
Mar 4, 2021
go-diff is not a line by line diffing tool at the moment[1] Instead, output lines in context. [1] sergi/go-diff#69 sergi/go-diff#91 Additionally, add a tab marker '˲ ' to be able to quickly see whitespace changes.
DavidGamba
added a commit
to DavidGamba/dap
that referenced
this issue
Mar 4, 2021
go-diff is not a line by line diffing tool at the moment[1] Instead, output lines in context. Rename LineByLineDiff to ColorDiff. Additionally, add a tab marker '˲ ' to be able to quickly see whitespace changes. [1] sergi/go-diff#69 sergi/go-diff#91
DavidGamba
added a commit
to DavidGamba/dap
that referenced
this issue
Mar 4, 2021
go-diff is not a line by line diffing tool at the moment[1] Instead, output lines in context. Rename LineByLineDiff to ColorDiff. Additionally, add a tab marker '˲ ' to be able to quickly see whitespace changes. [1] sergi/go-diff#69 sergi/go-diff#91
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When diffing JSON, we have some json like:
If we compare to
We end up with:
It would be nice to be able to prefer full-line or full word changes instead of single-character changes.
If you change the word "hello" to "goodbye", you see the diff as:
[{Delete hell} {Insert g} {Equal o} {Insert odbye}]
Which is much harder for a human to read than if the lib had the ability to prefer word/line boundaries and showed:
[{Delete hello} {Insert goodbye}]
The text was updated successfully, but these errors were encountered: