瀏覽代碼

#3464 reproduce diff signs

Unknwon 8 年之前
父節點
當前提交
6cda35a75f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      routers/repo/commit.go

+ 1 - 1
routers/repo/commit.go

@@ -145,6 +145,7 @@ func FileHistory(ctx *context.Context) {
 
 func Diff(ctx *context.Context) {
 	ctx.Data["PageIsDiff"] = true
+	ctx.Data["RequireHighlightJS"] = true
 
 	userName := ctx.Repo.Owner.Name
 	repoName := ctx.Repo.Repository.Name
@@ -201,7 +202,6 @@ func Diff(ctx *context.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)
 }