Skip to content

Commit 4a6bd60

Browse files
authored
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.
1 parent 830ab75 commit 4a6bd60

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

templates/repo/view_file.tmpl

+2-6
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,8 @@
103103
{{range $idx, $code := .FileContent}}
104104
{{$line := Add $idx 1}}
105105
<tr>
106-
<td id="L{{$line}}" class="lines-num">
107-
<span id="L{{$line}}" data-line-number="{{$line}}"></span>
108-
</td>
109-
<td rel="L{{$line}}" class="lines-code chroma">
110-
<code class="code-inner">{{$code | Safe}}</code>
111-
</td>
106+
<td id="L{{$line}}" class="lines-num"><span id="L{{$line}}" data-line-number="{{$line}}"></span></td>
107+
<td rel="L{{$line}}" class="lines-code chroma"><code class="code-inner">{{$code | Safe}}</code></td>
112108
</tr>
113109
{{end}}
114110
</tbody>

0 commit comments

Comments
 (0)