1
0
Fork 0
forked from forgejo/forgejo

Merge pull request #2335 from andreynering/highlight-diff

Highlight diff
This commit is contained in:
Unknwon 2016-01-09 13:39:18 +08:00
commit bcf6aed452
6 changed files with 192 additions and 14 deletions

View file

@ -168,6 +168,12 @@ func Diff(ctx *middleware.Context) {
}
}
for _, diffFile := range diff.Files {
for _, diffSection := range diffFile.Sections {
diffSection.ComputeLinesDiff()
}
}
ctx.Data["IsSplitStyle"] = ctx.Query("style") == "split"
ctx.Data["Username"] = userName
ctx.Data["Reponame"] = repoName