diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2016-01-31 14:19:02 -0200 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2016-02-04 18:21:47 -0200 |
commit | 2bfb8bb5fdebb4ae02c83a271e8eb24bc68afec1 (patch) | |
tree | 5d09fae4e0f0be52ec38437070433623c89f7006 /routers/repo/pull.go | |
parent | 137a49e8342ab207c8570fc18b7c81b5fa9789ab (diff) | |
download | gitea-2bfb8bb5fdebb4ae02c83a271e8eb24bc68afec1.tar.gz gitea-2bfb8bb5fdebb4ae02c83a271e8eb24bc68afec1.zip |
Enable sintax highlighting on diff view. Close #733
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r-- | routers/repo/pull.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index e3500716d3..3240461c84 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -362,6 +362,7 @@ func ViewPullFiles(ctx *middleware.Context) { ctx.Data["SourcePath"] = setting.AppSubUrl + "/" + path.Join(headTarget, "src", endCommitID) ctx.Data["BeforeSourcePath"] = setting.AppSubUrl + "/" + path.Join(headTarget, "src", startCommitID) ctx.Data["RawPath"] = setting.AppSubUrl + "/" + path.Join(headTarget, "raw", endCommitID) + ctx.Data["RequireHighlightJS"] = true ctx.HTML(200, PULL_FILES) } @@ -538,6 +539,7 @@ func CompareAndPullRequest(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.pulls.compare_changes") ctx.Data["PageIsComparePull"] = true ctx.Data["IsDiffCompare"] = true + ctx.Data["RequireHighlightJS"] = true renderAttachmentSettings(ctx) headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch := ParseCompareInfo(ctx) |