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.
This commit is contained in:
silverwind 2021-11-29 14:01:56 -08:00 committed by GitHub
parent 830ab75ce0
commit 4a6bd60df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -103,12 +103,8 @@
{{range $idx, $code := .FileContent}} {{range $idx, $code := .FileContent}}
{{$line := Add $idx 1}} {{$line := Add $idx 1}}
<tr> <tr>
<td id="L{{$line}}" class="lines-num"> <td id="L{{$line}}" class="lines-num"><span id="L{{$line}}" data-line-number="{{$line}}"></span></td>
<span id="L{{$line}}" data-line-number="{{$line}}"></span> <td rel="L{{$line}}" class="lines-code chroma"><code class="code-inner">{{$code | Safe}}</code></td>
</td>
<td rel="L{{$line}}" class="lines-code chroma">
<code class="code-inner">{{$code | Safe}}</code>
</td>
</tr> </tr>
{{end}} {{end}}
</tbody> </tbody>