Use full group name in GFM group reference title

This commit is contained in:
Douwe Maan 2017-03-01 17:07:40 -06:00
parent 981c730fdb
commit 6fd28ff244
3 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,4 @@
---
title: Use full group name in GFM group reference title
merge_request:
author:

View File

@ -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)

View File

@ -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