Attachment pastes keep row.Content empty by design, but the paste view template only suppressed the code block for IMAGE attachments ({{if not .AttachmentImage}}), so non-image attachments (csv, text, binaries) rendered an empty code area with a gutter.
Change: gate the code block on {{if not .Attachment}} so any file-only paste renders only the attachment chip/preview.
Fix attempt 1.
Attachment pastes keep row.Content empty by design, but the paste view template only suppressed the code block for IMAGE attachments ({{if not .AttachmentImage}}), so non-image attachments (csv, text, binaries) rendered an empty code area with a gutter.
Change: gate the code block on {{if not .Attachment}} so any file-only paste renders only the attachment chip/preview.
Verified on a local build:
- csv attachment paste: 0 codebody/0 id=code elements, attachment chip present, /raw serves sniffed text/plain
- image attachment paste: preview img present, codebody absent (regression check)
- text paste unchanged: codebody present
- go build + go test pass; no CSP violations in headless chromium console
Ref #249
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fix attempt 1.
Attachment pastes keep row.Content empty by design, but the paste view template only suppressed the code block for IMAGE attachments ({{if not .AttachmentImage}}), so non-image attachments (csv, text, binaries) rendered an empty code area with a gutter.
Change: gate the code block on {{if not .Attachment}} so any file-only paste renders only the attachment chip/preview.
Verified on a local build:
Ref #249