summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-11-22 14:20:35 +0100
committerJarka Kadlecova <jarka@gitlab.com>2017-11-23 12:59:14 +0100
commite826c5d0917a7fe2225fb6ba0862bc56c1ef3fc2 (patch)
treee3e140a141541109d6cd23d8a36899ea57a20298 /lib/banzai
parent6369db0196ec7b6e288b16382c95243424a59b62 (diff)
downloadgitlab-ce-e826c5d0917a7fe2225fb6ba0862bc56c1ef3fc2.tar.gz
Fix link text from group context
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/filter/abstract_reference_filter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/banzai/filter/abstract_reference_filter.rb b/lib/banzai/filter/abstract_reference_filter.rb
index 9fef386de16..8975395aff1 100644
--- a/lib/banzai/filter/abstract_reference_filter.rb
+++ b/lib/banzai/filter/abstract_reference_filter.rb
@@ -213,7 +213,8 @@ module Banzai
end
def object_link_text(object, matches)
- text = object.reference_link_text(context[:project])
+ parent = context[:project] || context[:group]
+ text = object.reference_link_text(parent)
extras = object_link_text_extras(object, matches)
text += " (#{extras.join(", ")})" if extras.any?