mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Just use a slice when rendering file (#16774)
Highlight currently uses a map which is memory inefficient. Switch to use a slice instead. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -99,7 +99,8 @@
|
||||
{{else}}
|
||||
<table>
|
||||
<tbody>
|
||||
{{range $line, $code := .FileContent}}
|
||||
{{range $idx, $code := .FileContent}}
|
||||
{{$line := Add $idx 1}}
|
||||
<tr>
|
||||
<td id="L{{$line}}" class="lines-num">
|
||||
<span id="L{{$line}}" data-line-number="{{$line}}"></span>
|
||||
|
Reference in New Issue
Block a user