aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/view_file.tmpl
diff options
context:
space:
mode:
authorRory McNamara <psychomario@users.noreply.github.com>2016-08-09 20:35:20 +0100
committer无闻 <u@gogs.io>2016-08-09 12:35:20 -0700
commitc8b45ecc2762a9d64dbe83cafd68b137661448a5 (patch)
treedf16d7b1b41d3fcade098cfe550cc61955d048c6 /templates/repo/view_file.tmpl
parent9e8a8867ea3b4c977b436951a28d84e0c2ad2e4b (diff)
downloadgitea-c8b45ecc2762a9d64dbe83cafd68b137661448a5.tar.gz
gitea-c8b45ecc2762a9d64dbe83cafd68b137661448a5.zip
Render the Code view on the server (minus syntax highlighting) (#2942)
* render code view server side * remove debug print * fix multiline selection bug * change string concatenation to bytes.Buffer for efficiency * Fix newlines added by previous for hljs * fix selection highlighting * make css changes in .less
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r--templates/repo/view_file.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index cd0caf10f9..0f42df4925 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -44,7 +44,7 @@
{{if .IsFileTooLarge}}
<td><strong>{{.i18n.Tr "repo.file_too_large"}}</strong></td>
{{else}}
- <td class="lines-num"></td>
+ <td class="lines-num">{{.LineNums}}</td>
<td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol class="linenums">{{.FileContent}}</ol></code></pre></td>
{{end}}
</tr>