mmanela / diffplex

DiffPlex is Netstandard 1.0+ C# library to generate textual diffs.
Apache License 2.0
995 stars 183 forks source link

Invalid diff containing spaces in Side By Side Diff model #27

Closed MistyKuu closed 7 years ago

MistyKuu commented 7 years ago

I'm building diff view using DiffPlex version 1.2.1. I've noticed however that sometimes it picks up a space (or .) after the word as a difference and sometimes it doesn't. Why does it even include it if it's the same in both texts?

This is how I do it:

    SideBySideDiffBuilder DiffBuilder = new SideBySideDiffBuilder(new Differ());
    var result = DiffBuilder.BuildDiffModel(pair.Deleted.Content, pair.Added.Content);

Later I'm using Subpieces texts to highlight the difference.

Incorrect: image

First part incorrect, second is correct:

image

MistyKuu commented 7 years ago

It seems to be fixed when I used sources.