Commit 6fd28ff2 authored by Douwe Maan's avatar Douwe Maan

Use full group name in GFM group reference title

parent 981c730f
---
title: Use full group name in GFM group reference title
merge_request:
author:
......@@ -133,7 +133,7 @@ module Banzai
data = data_attribute(group: namespace.id)
content = link_content || Group.reference_prefix + group
link_tag(url, data, content, namespace.name)
link_tag(url, data, content, namespace.full_name)
end
def link_to_user(user, namespace, link_content: nil)
......
......@@ -123,6 +123,12 @@ describe Banzai::Filter::UserReferenceFilter, lib: true do
expect(doc.css('a').first.attr('href')).to eq urls.group_url(group)
end
it 'has the full group name as a title' do
doc = reference_filter("Hey #{reference}")
expect(doc.css('a').first.attr('title')).to eq group.full_name
end
end
it 'links with adjacent text' 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