Skip to content

Is it possible to prefer single line changes instead of multi-line? #91

Open
@Aaron3

Description

@Aaron3

When diffing JSON, we have some json like:

{
    "del": "^2.2.0",
    "es6-symbol": "^3.1.1",
    "eslint": "^4.11.0",
    "eslint-config-enough": "0.2.5",
}

If we compare to

{
    "del": "^2.2.0",
    "eslint": "^4.11.0",
    "eslint-config-enough": "0.2.5",
}

We end up with:

image

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}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions