Skip to content

Commit f7e2296

Browse files
committed
fixed bug in my diffMain refactor and fixed diffCompute bug where DiffInsert was used instead of DiffDelete
1 parent 71e2760 commit f7e2296

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

diff/dmp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func (dmp *DiffMatchPatch) diffCompute(text1 string, text2 string, checklines bo
277277

278278
if len(text2) == 0 {
279279
// Just delete some text (speedup).
280-
return append(diffs, Diff{DiffInsert, text1})
280+
return append(diffs, Diff{DiffDelete, text1})
281281
}
282282

283283
var longtext, shorttext string

0 commit comments

Comments
 (0)