summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorFlorian Kaiser <florian.kaiser@fnkr.net>2016-02-01 19:52:47 +0000
committerFlorian Kaiser <florian.kaiser@fnkr.net>2016-02-01 19:53:58 +0000
commit3e0a27157c8a87d8da166530f290260264185b4e (patch)
tree09971bc14792e832e1abbe279e57d1493bdba488 /routers
parent3abad75a1bb4b2c207cb5c0ce09295369d65bf9a (diff)
downloadgitea-3e0a27157c8a87d8da166530f290260264185b4e.tar.gz
gitea-3e0a27157c8a87d8da166530f290260264185b4e.zip
Make highlighted markdown code blocks work on issue pages
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index a4efb68024..b031e42ce7 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -291,6 +291,8 @@ func NewIssue(ctx *middleware.Context) {
return
}
+ ctx.Data["RequireHighlightJS"] = true
+
ctx.HTML(200, ISSUE_NEW)
}
@@ -623,6 +625,9 @@ func ViewIssue(ctx *middleware.Context) {
ctx.Data["Issue"] = issue
ctx.Data["IsIssueOwner"] = ctx.Repo.IsAdmin() || (ctx.IsSigned && issue.IsPoster(ctx.User.Id))
ctx.Data["SignInLink"] = setting.AppSubUrl + "/user/login"
+
+ ctx.Data["RequireHighlightJS"] = true
+
ctx.HTML(200, ISSUE_VIEW)
}