diff options
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r-- | routers/repo/view.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go index 00790a4ef3..1967b511ca 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -304,6 +304,8 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st var output bytes.Buffer lines := strings.Split(fileContent, "\n") + ctx.Data["NumLines"] = len(lines) + //Remove blank line at the end of file if len(lines) > 0 && lines[len(lines)-1] == "" { lines = lines[:len(lines)-1] |