summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-12-07 12:47:46 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-12-07 12:47:46 +0000
commit0054e1567b87795cc907232a4c1e9388be5c11a5 (patch)
treeb249984f8a6f53d15bb1acb8bb49c1ed2fb42243 /app
parent996da1e52c3e1f3f1ec58f81f602167e4ff539a3 (diff)
parent0c2fdb1c342fa5eb64bb0ed02091af3c06b37c0e (diff)
downloadgitlab-ce-0054e1567b87795cc907232a4c1e9388be5c11a5.tar.gz
Merge branch 'ce-backport-3615' into 'master'
Refactor banzai to support referencing from group context See merge request gitlab-org/gitlab-ce!15766
Diffstat (limited to 'app')
-rw-r--r--app/helpers/markup_helper.rb2
-rw-r--r--app/models/epic.rb10
2 files changed, 9 insertions, 3 deletions
diff --git a/app/helpers/markup_helper.rb b/app/helpers/markup_helper.rb
index 1e4be2d4bcf..f78d41a0448 100644
--- a/app/helpers/markup_helper.rb
+++ b/app/helpers/markup_helper.rb
@@ -86,6 +86,8 @@ module MarkupHelper
return '' unless text.present?
context[:project] ||= @project
+ context[:group] ||= @group
+
html = markdown_unsafe(text, context)
prepare_for_rendering(html, context)
end
diff --git a/app/models/epic.rb b/app/models/epic.rb
index 62898a02e2d..286b855de3f 100644
--- a/app/models/epic.rb
+++ b/app/models/epic.rb
@@ -1,7 +1,11 @@
# Placeholder class for model that is implemented in EE
-# It will reserve (ee#3853) '&' as a reference prefix, but the table does not exists in CE
+# It reserves '&' as a reference prefix, but the table does not exists in CE
class Epic < ActiveRecord::Base
- # TODO: this will be implemented as part of #3853
- def to_reference
+ def self.reference_prefix
+ '&'
+ end
+
+ def self.reference_prefix_escaped
+ '&amp;'
end
end