diff options
author | zeripath <art27@cantab.net> | 2020-08-04 22:30:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 22:30:02 +0100 |
commit | 33391e04feb6be1c2f8bec0928f500df0f110d89 (patch) | |
tree | 98b88a52e2c0166c6eefb57215fc9fa7bbb473c6 /templates | |
parent | 8a6790b2aa07fa006d0338669e1da6134a58e313 (diff) | |
download | gitea-33391e04feb6be1c2f8bec0928f500df0f110d89.tar.gz gitea-33391e04feb6be1c2f8bec0928f500df0f110d89.zip |
Prevent empty div when editing comment (#12404)
* Prevent empty div when editing comment
The template for attachments needs to remove whitespace and return empty when there are no attachments.
Fix #10220
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/attachments.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl index 2d3c638179..3c69dbc2ba 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -1,4 +1,4 @@ -{{range .Attachments}} +{{- range .Attachments -}} <div class="twelve wide column" style="padding: 6px;"> <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> {{if FilenameIsImage .Name}} @@ -12,4 +12,4 @@ <div class="four wide column" style="padding: 0px;"> <span class="ui text grey right">{{.Size | FileSize}}</span> </div> -{{end}} +{{end -}} |