diff options
author | silverwind <me@silverwind.io> | 2021-11-29 14:01:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-30 00:01:56 +0200 |
commit | 4a6bd60df0c4f802c120ad420ca2fb75e84a7d89 (patch) | |
tree | 83c38051c7a4512d0696c4dffb2ad897e6419f9c /templates/repo/view_file.tmpl | |
parent | 830ab75ce03e187ee7bff024ed8318db47a62f8b (diff) | |
download | gitea-4a6bd60df0c4f802c120ad420ca2fb75e84a7d89.tar.gz gitea-4a6bd60df0c4f802c120ad420ca2fb75e84a7d89.zip |
Remove whitespace inside rendered code `<td>` (#17859)
This extra whitespace caused isses in Firefox where it would copy a
extra space character at the start and the end. Additionally, in Chrome,
the text selection indicated a spaced on the end of the selection where
there was none. Both issues are fixed with the removal of whitespace.
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r-- | templates/repo/view_file.tmpl | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 5ff43426eb..6698e6bbe5 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -103,12 +103,8 @@ {{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> - </td> - <td rel="L{{$line}}" class="lines-code chroma"> - <code class="code-inner">{{$code | Safe}}</code> - </td> + <td id="L{{$line}}" class="lines-num"><span id="L{{$line}}" data-line-number="{{$line}}"></span></td> + <td rel="L{{$line}}" class="lines-code chroma"><code class="code-inner">{{$code | Safe}}</code></td> </tr> {{end}} </tbody> |