We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17df971 commit dcde5a4Copy full SHA for dcde5a4
diffmatchpatch/dmp.go
@@ -967,7 +967,7 @@ func (dmp *DiffMatchPatch) DiffCleanupSemantic(diffs []Diff) []Diff {
967
float64(overlapLength2) >= float64(len(insertion))/2 {
968
// Reverse overlap found.
969
// Insert an equality and swap and trim the surrounding edits.
970
- overlap := Diff{DiffEqual, insertion[len(insertion)-overlapLength2:]}
+ overlap := Diff{DiffEqual, deletion[:overlapLength2]}
971
diffs = append(
972
diffs[:pointer],
973
append([]Diff{overlap}, diffs[pointer:]...)...)
0 commit comments