summaryrefslogtreecommitdiffstats
path: root/routers/repo/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r--routers/repo/view.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 4ba26a0c4f..191f123454 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -79,11 +79,7 @@ func Home(ctx *middleware.Context) {
ctx.Data["FileSize"] = blob.Size()
ctx.Data["IsFile"] = true
ctx.Data["FileName"] = blob.Name()
- ext := path.Ext(blob.Name())
- if len(ext) > 0 {
- ext = ext[1:]
- }
- ctx.Data["FileExt"] = ext
+ ctx.Data["HighlightClass"] = template.FileNameToHighlightClass(blob.Name())
ctx.Data["FileLink"] = rawLink + "/" + treename
buf := make([]byte, 1024)