From 49c8439d66bd895947b1e9fca00f1ff839b05d90 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 29 Nov 2021 21:06:52 +0100 Subject: [PATCH] Remove whitespace inside rendered code `` 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. --- templates/repo/view_file.tmpl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 5ff43426eb76..6698e6bbe5ab 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}} - - - - - {{$code | Safe}} - + + {{$code | Safe}} {{end}}