Commit 46173ec8 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix-markdown-links-in-dashboard' into 'master'

Fix Markdown links not showing up in dashboard activity feed

Closes #2586

See merge request !1353
parents ca45e925 3b39b648
Please view this file on the master branch, on stable branches it's out of date.
v 8.0.0 (unreleased)
- Fix Markdown links not showing up in dashboard activity feed (Stan Hu)
- Fix HTML link that was improperly escaped in new user e-mail (Stan Hu)
- Fix broken sort in merge request API (Stan Hu)
- Bump rouge to 1.10.1 to remove warning noise and fix other syntax highlighting bugs (Stan Hu)
......
......@@ -45,7 +45,7 @@ module GitlabMarkdownHelper
end
def markdown(text, context = {})
context.merge!(
context.reverse_merge!(
current_user: current_user,
path: @path,
project: @project,
......@@ -59,7 +59,7 @@ module GitlabMarkdownHelper
# TODO (rspeicher): Remove all usages of this helper and just call `markdown`
# with a custom pipeline depending on the content being rendered
def gfm(text, options = {})
options.merge!(
options.reverse_merge!(
current_user: current_user,
path: @path,
project: @project,
......
......@@ -38,6 +38,17 @@ describe GitlabMarkdownHelper do
expect(markdown(actual)).to match(expected)
end
end
describe "override default project" do
let(:actual) { issue.to_reference }
let(:second_project) { create(:project) }
let(:second_issue) { create(:issue, project: second_project) }
it 'should link to the issue' do
expected = namespace_project_issue_path(second_project.namespace, second_project, second_issue)
expect(markdown(actual, project: second_project)).to match(expected)
end
end
end
describe '#link_to_gfm' do
......
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