Fix Markdown links not showing up in dashboard activity feed
Closes #2586
This commit is contained in:
parent
5a8d73243a
commit
3b39b648d2
|
@ -1,6 +1,7 @@
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue