Commit 6cdb12b9 authored by Michael Kozono's avatar Michael Kozono

Merge branch 'sh-fix-release-markdown' into 'master'

Fix Markdown attachments in Releases not rendering with full URL

See merge request gitlab-org/gitlab!50146
parents 15d287fd 1fee875e
......@@ -15,4 +15,4 @@
%p
%h4= _("Release notes:")
= markdown_field(@release, :description)
= markdown(@release.description, pipeline: :email, author: @release.author)
---
title: Fix Markdown attachments in Releases not rendering with full URL
merge_request: 50146
author:
type: fixed
......@@ -49,5 +49,14 @@ RSpec.describe Emails::Releases do
is_expected.to have_body_text('Release notes:')
is_expected.to have_body_text(release.description)
end
context 'release notes with attachment' do
let(:upload_path) { '/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg' }
let(:release) { create(:release, project: project, description: "Attachment: [Test file](#{upload_path})") }
it 'renders absolute links' do
is_expected.to have_body_text(%Q(<a href="#{project.web_url}#{upload_path}" data-link="true" class="gfm">Test file</a>))
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment