Skip to content

Commit 5a1a02d

Browse files
committed
use checklines=false when diff
1 parent 0600a14 commit 5a1a02d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

routers/web/repo/issue_content_history.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ func GetContentHistoryDetail(ctx *context.Context) {
138138

139139
// compare the current history revision with the previous one
140140
dmp := diffmatchpatch.New()
141-
diff := dmp.DiffMain(prevHistoryContentText, history.ContentText, true)
141+
// `checklines=false` makes better diff result
142+
diff := dmp.DiffMain(prevHistoryContentText, history.ContentText, false)
142143
diff = dmp.DiffCleanupEfficiency(diff)
143144

144145
// use chroma to render the diff html

0 commit comments

Comments
 (0)