mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +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:
parent
73defbbd1c
commit
f31e7a67cf
3 changed files with 41 additions and 42 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue