Commit d95ac1b6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'dm-group-reference-full-name' into 'master'

Use full group name in GFM group reference title

See merge request !9642
parents bb062ebd 6fd28ff2
---
title: Use full group name in GFM group reference title
merge_request:
author:
...@@ -133,7 +133,7 @@ module Banzai ...@@ -133,7 +133,7 @@ module Banzai
data = data_attribute(group: namespace.id) data = data_attribute(group: namespace.id)
content = link_content || Group.reference_prefix + group content = link_content || Group.reference_prefix + group
link_tag(url, data, content, namespace.name) link_tag(url, data, content, namespace.full_name)
end end
def link_to_user(user, namespace, link_content: nil) def link_to_user(user, namespace, link_content: nil)
......
...@@ -123,6 +123,12 @@ describe Banzai::Filter::UserReferenceFilter, lib: true do ...@@ -123,6 +123,12 @@ describe Banzai::Filter::UserReferenceFilter, lib: true do
expect(doc.css('a').first.attr('href')).to eq urls.group_url(group) expect(doc.css('a').first.attr('href')).to eq urls.group_url(group)
end 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 end
it 'links with adjacent text' do 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