aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/commit.go
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2016-01-31 14:19:02 -0200
committerAndrey Nering <andrey.nering@gmail.com>2016-02-04 18:21:47 -0200
commit2bfb8bb5fdebb4ae02c83a271e8eb24bc68afec1 (patch)
tree5d09fae4e0f0be52ec38437070433623c89f7006 /routers/repo/commit.go
parent137a49e8342ab207c8570fc18b7c81b5fa9789ab (diff)
downloadgitea-2bfb8bb5fdebb4ae02c83a271e8eb24bc68afec1.tar.gz
gitea-2bfb8bb5fdebb4ae02c83a271e8eb24bc68afec1.zip
Enable sintax highlighting on diff view. Close #733
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r--routers/repo/commit.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index c3fc4d177a..781c3da946 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -183,6 +183,7 @@ func Diff(ctx *middleware.Context) {
ctx.Data["BeforeSourcePath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "src", parents[0])
}
ctx.Data["RawPath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "raw", commitID)
+ ctx.Data["RequireHighlightJS"] = true
ctx.HTML(200, DIFF)
}