aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r--routers/repo/view.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 25e312b1c1..6a4ad64642 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -19,6 +19,7 @@ import (
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/modules/template"
+ "github.com/gogits/gogs/modules/template/highlight"
)
const (
@@ -79,7 +80,7 @@ func Home(ctx *middleware.Context) {
ctx.Data["FileSize"] = blob.Size()
ctx.Data["IsFile"] = true
ctx.Data["FileName"] = blob.Name()
- ctx.Data["HighlightClass"] = template.FileNameToHighlightClass(blob.Name())
+ ctx.Data["HighlightClass"] = highlight.FileNameToHighlightClass(blob.Name())
ctx.Data["FileLink"] = rawLink + "/" + treename
buf := make([]byte, 1024)